Commit Graph

848 Commits

Author SHA1 Message Date
98141c3d73 Replace repetitive meta/ctrl condition with a method 2025-11-10 16:23:28 +01:00
65bf516006 Fix memnew_placement with char * arguments. Before, it would call the description version, allocating on the heap instead of ni the given memory. 2025-10-25 18:50:22 +02:00
5935a32e32 Core: Cleanup headers in core/config
- `MainLoop` now forward-declared in `OS`
2025-10-06 09:20:56 -05:00
6febc2bf96 Merge pull request #111066 from Ivorforce/memory-namespace
Change `Memory` from a class into a namespace.
2025-10-06 09:06:42 -05:00
4211499248 Change Memory from a class into a namespace. 2025-10-04 17:22:07 +02:00
1bf821c1e1 Store current capacity in CowData buffers, and rewrite most of it.
Add `reserve` to `CowData`, `Vector` and `Array`.

# Conflicts:
#	core/os/memory.h
#	core/templates/cowdata.h
2025-09-25 22:00:17 +02:00
5fda92451d Merge pull request #100145 from Ivorforce/memory-offset-func
Add `mem_aligned_address` to simplify data offset constants.
2025-09-25 14:57:09 -05:00
3ac159094f Add memory_get_offset to simplify data offset constants. 2025-09-25 20:55:33 +02:00
326b22124a Merge pull request #108794 from bruvzg/macos_actool_export
[macOS] Add support for exporting macOS 26 Liquid Glass icons.
2025-09-20 13:41:38 -05:00
838cb0eefc [macOS] Add support for exporting macOS 26 Liquid Glass icons. 2025-07-28 14:35:48 +03:00
00f5b230be Fix modifier order in keycode string generation
Fix the order in which modifier keys are appended in as_text() and keycode_get_string() to ensure consistent and logical ordering (Ctrl, Alt, Shift, Meta). Refactored keycode_get_string() to use a vector for building the key string, improving readability and maintainability.
2025-07-06 14:23:50 -07:00
f411c5b2f1 [Web] Add Web-build specific stdout header 2025-06-12 13:00:36 -04:00
bb9d6d0d02 Merge pull request #107113 from mihe/macos-open-in-program
Add `OS::open_with_program` for opening files/directories with a specific program on macOS
2025-06-05 13:13:49 +02:00
f610c81943 Add OS::open_with_program for opening files/directories with a specific program on macOS
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2025-06-05 10:12:01 +02:00
98f377d9d0 Use system timer/wait functions for frame delay when screen reader is active. 2025-06-04 13:44:02 +03:00
ee181951b6 [macOS] Add support for loading shell environment from UI apps. 2025-06-03 18:27:29 +03:00
bb47f01481 Merge pull request #106390 from akien-mga/linux-drop-ppc32
Linux: Drop `ppc32` (32-bit PowerPC) architecture support
2025-05-28 09:47:34 -05:00
8bcec7afa9 Merge pull request #106730 from Ivorforce/simplify-memnew-arr-placement
Simplify `Memory::memnew_arr_placement` to always initialize memory
2025-05-26 11:24:43 -05:00
ba68e2a1e8 Update time.cpp year/unix time conversions to be constant time
Added functions to convert between year and day from unix timestamps in constant time, to avoid having to iterate one year at a time.
2025-05-23 14:02:14 -04:00
4371aa864d Simplify Memory::memnew_arr_placement to always initialize memory, to force callers to make the decision of whether to initialize. 2025-05-22 22:25:12 +02:00
25a3c27c41 Merge pull request #105628 from rsanchezsaez/apple/ios-visionos-4.5
Native visionOS platform support
2025-05-20 23:09:07 +02:00
47971c0a27 Introduce 'visionos' platform derived from 'apple_embedded' 2025-05-19 15:47:01 -07:00
2d42b889d1 Merge pull request #104124 from Ivorforce/alloc-static-calloc
Add `Memory::alloc_static_zeroed` to allocate memory that's filled with zeroes.
2025-05-19 08:01:33 -05:00
5538850d87 Core: Convert Pair/KeyValue to constexpr 2025-05-15 10:37:41 -05:00
820380817a Exclude RD creation test functions from templates 2025-05-15 10:12:38 +02:00
1de9789806 Linux: Drop ppc32 (32-bit PowerPC) architecture support
This was added together with `ppc64le` in #54490, but seemingly only for the
purpose of getting it to compile on a Linux distro that aims at maximizing
support for all CPU architectures.

I don't think anyone has ever _run_ Godot on a `ppc32` system (do those even
support OpenGL ES 3.0?) and so I don't think we should aim to support it.

Debian dropped support for its PowerPC (`ppc32`) arch in Debian 9, released
in 2017.
2025-05-14 10:22:12 +02:00
3207066e19 Add Memory::alloc_static_zeroed to allocate memory that's filled with zeroes.
This is generally faster than `malloc` followed by `memset` / loop-set to 0.
2025-05-13 01:57:05 +02:00
01fc9aee6c Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
af7610576a Remove unused Memory::alloc_count. 2025-04-25 21:44:26 +02:00
28089c40c1 Merge pull request #91006 from reduz/live-backtrace
Ability to print and log script backtraces
2025-04-24 17:18:52 -05:00
d1dcb40d56 Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
88a43b7039 Supress unused paramater warning conflicting with if constexpr 2025-04-12 13:18:12 -07:00
cade15a163 Merge pull request #92475 from AThousandShips/string_replace_char
Add `String::replace_char(s)` methods for performance and convenience
2025-04-10 10:18:16 -05:00
fc1dbda769 Merge pull request #105164 from stuartcarnie/apple_pthread
Apple: Add pthread implementation of `Thread` class
2025-04-10 10:18:12 -05:00
889410dcda Add String::replace_char(s) methods for performance and convenience 2025-04-10 13:08:45 +02:00
8c8d6de3e7 Apple: Add pthread implementation of Thread class
This allows Apple platforms to override the default stack size of
a thread in the WorkerThreadPool, which is 512KiB by default.

This must be increased, as SPIRV-Cross, used by the Metal driver, can
use deeply nested stacks, as can debug builds.
2025-04-10 09:35:40 +10:00
b7402b7597 Move THREADS_ENABLED check after common imports 2025-04-08 14:24:13 -04:00
9977abd697 Validate custom directory when project is started 2025-04-04 21:21:42 +08:00
207a2b6472 Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
48bfe13e4f Add methods to decode/encode multibyte encodings. 2025-03-28 17:32:34 +02:00
f09ee0171a Style: Begin integrating simple .clangd fixes 2025-03-22 13:24:35 -05:00
6759d3b812 Fix "Unicode parsing error" spam when opening editor. 2025-03-14 08:32:26 +01:00
97ee05e9b7 Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp 2025-03-12 11:11:38 -07:00
74907876d3 Merge pull request #103759 from Ivorforce/zero-constructible
Optimize `Array.resize` by using `memset` (through new `is_zero_constructible` type trait)
2025-03-12 10:31:55 -05:00
75bc471965 Add is_zero_constructible to denote if a type can be semi-trivially constructed with all 0 bytes.
Optimize `CowData` and `LocalVector` resize for zero constructible types.
Mark several compatible types as `is_zero_constructible`.
2025-03-12 09:49:24 +01:00
a7d0724b1a Remove outdated vformat comments/workarounds in Time.cpp
Time methods returning Strings with both date and time values included were calling vformat twice, as older vformat implementation limited how many arguments could be passed in.  Updated these methods to just call vformat once.
2025-03-11 06:57:30 -04:00
331a43a9d8 Add String::remove_char(s) methods for performance and convenience 2025-03-10 13:19:28 +01:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
6ed12bfc5d [Linux/BSD] Offload RenderingDevice creation test to subprocess. 2025-03-04 13:18:26 +02:00