Commit Graph

9533 Commits

Author SHA1 Message Date
Thaddeus Crews 6fccedc3cd Merge pull request #120578 from Nintorch/small-joy-touchpad-fixes
Small joypad touchpad API fixes
2026-06-24 10:16:06 -05:00
Thaddeus Crews cf2b36e13d Merge pull request #120021 from NohbdyAhtall/master
Add Toki Pona to language script list
2026-06-24 10:15:59 -05:00
Dario 5d87e9b616 Add support for ASTC 6x6 and high quality compression profiles. 2026-06-23 14:00:26 -03:00
Nintorch 9968f1f78c Small joypad touchpad API fixes 2026-06-23 18:58:44 +05:00
Thaddeus Crews 8222d0983a Merge pull request #118856 from Ivorforce/stringname-string-conversion
Change `StringName` -> `String` conversion from `operator String()` to `string()`
2026-06-23 07:01:08 -05:00
Thaddeus Crews 2e41e531b9 Merge pull request #120128 from aurpine/fix-double-instantiation
Fix Variant double initialization
2026-06-23 07:01:06 -05:00
aurpine 64a1ca6d45 Fix Variant double instantiation in VariantTypeChanger::change_and_reset 2026-06-22 12:47:39 -04:00
Nohbdy Ahtall 7c37879130 add toki pona to language script list 2026-06-22 08:20:08 -07:00
Lukas Tenbrink 2659124e66 Change StringName -> String conversion from operator String() to string(). 2026-06-22 15:46:16 +02:00
Thaddeus Crews 19cf57431d Merge pull request #107126 from a-johnston/expose_fuzzy_search
Expose fuzzy search api to scripting
2026-06-22 08:29:48 -05:00
Thaddeus Crews f964fa714f Merge pull request #118575 from DeeJayLSP/gdtype-name-hierarchy
Exchange use of `ClassDB::is_parent_class()` with `Object::is_class()` where possible
2026-06-19 15:09:27 -05:00
Thaddeus Crews 1567add1a7 Merge pull request #120154 from Calinou/print-rich-add-named-urls
Add support for named `[url]` tags in `print_rich()` ANSI conversion
2026-06-19 15:09:26 -05:00
Thaddeus Crews ef79fa3fc0 Merge pull request #117946 from HolonProduction/editor-language-kickoff
Introduce `EditorLanguage` and move `ScriptLanguage::complete_code` into it.
2026-06-19 15:09:19 -05:00
Thaddeus Crews de831fbe91 Merge pull request #39708 from Calinou/add-builtin-fullscreen-toggle
Toggle fullscreen mode when pressing Alt + Enter by default
2026-06-19 12:05:59 -05:00
Thaddeus Crews 74578fa41a Merge pull request #118767 from bruvzg/pref_lcs
[macOS/iOS/Windows] Add method to get full list of user preferred locales and use it for the editor locale selection.
2026-06-19 12:05:59 -05:00
Thaddeus Crews 9700abd3ba Merge pull request #119123 from blueskythlikesclouds/group-task-for-shader-cache-load
Allow shader containers to be loaded in parallel.
2026-06-19 12:05:58 -05:00
Thaddeus Crews 0eea0da219 Merge pull request #111714 from Nintorch/joypad-touchpads
Add support for joypad touchpads
2026-06-19 12:05:54 -05:00
Adam Johnston 132c9e5ce2 Expose fuzzy search classes in public api 2026-06-18 13:20:25 -07:00
Thaddeus Crews f6260eb8fc Merge pull request #113204 from Ivorforce/nodepath-cow
Make `NodePath` copy-on-write, to avoid it changing accidentally (through copies)
2026-06-18 15:14:18 -05:00
Thaddeus Crews 870de716f5 Merge pull request #117280 from EdwardChanCH/expose_bool_less_equal_greater_equal
Expose bool `<=` and `>=` operators
2026-06-18 15:14:17 -05:00
Thaddeus Crews 1d88ddda0f Merge pull request #120004 from Cyklon3000/rand_weighted_error_handling
Forbid negative weights in `RandomPCG::rand_weighted`
2026-06-18 15:14:07 -05:00
Pāvels Nadtočajevs 75e0f205f2 Do not inline new operators. 2026-06-18 15:23:38 +03:00
Lukas Tenbrink 97ef21eacd Fix UDP server peer connections. 2026-06-17 18:21:44 +02:00
HP van Braam b527505338 Revert "Fix a deadlock in WorkerThreadPool"
This turned out to break a lot of things in the engine unexpectedly. The
actual deadlock that this fixes seems rare so a better approach is
needed.

For 4.7 we should drop this one.

This reverts commit ae564feb2a.
This reverts commit 7ab8328204.
2026-06-12 20:09:27 +02:00
Hugo Locurcio ca1e51c615 Add support for named [url] tags in print_rich() ANSI conversion
This uses OSC 8 escape codes, which are well-supported in modern terminal
emulators.

Note that Terminal.app and conhost (the legacy Windows console) don't
support named URLs, but unnamed URLs can still be used.
2026-06-10 18:20:06 +02:00
HP van Braam ae564feb2a Fix a deadlock in WorkerThreadPool
When the main thread is waiting on a worker thread pool via
WorkerThreadPool::wait_for_group_task_completion() the MessageQueue is no
longer being serviced.

But in ResourceLoader::_load_complete_inner we need to be able to push a
callable onto the MessageQueue and we wait until completion. Effectively
waiting on the main thread to run our code.

If the tasking waiting on completion is in the group the main thread is
waiting for then this can never happen.

We solve this problem by servicing the MessageQueue in the
WorkerThreadPool if main thread is waiting. To avoid busy waiting on the
semaphore we sleep for a very brief time to spare battery without impacting
latency too much in the waiting case.
2026-06-10 12:46:42 +02:00
HP van Braam 7ab8328204 Don't flush the message queue before a MainLoop is iterating
Allowing this breaks several assumptions in the engine, normally this
doesn't occur but when using the WTP it can occur. For instance during
resource loading the message queue is serviced during tear down.

This means this situation can be created from user code if they do async
resource loading in the `_load` of a resource in the main scene.

This also makes the MainLoop report that it IS iterating during tests as
the tests expect the message queue to be serviced even though no main
loop is running.
2026-06-09 15:29:53 +02:00
HP van Braam b88a62f805 Fix ResourceLoader deadlocks
This fixes several issues:
 * There was a bug in the cycle detection. It was possible for the cycle
   detection to fail because the current thread isn't in the list. Fix
   this by just seeing if any of the next threads were already in the
   cycle.
 * By way of an optimization the thread_waiting_on bookkeeping was done
   under the same thread_load_mutex as the cycle detection. But there is
   also an early exit after yields. If we exit through the yield the
   thread_waiting_on entry is stale and can cause other threads to fail
   to do cycle detection.
 * When multiple threads end up finishing a resource simultaneously
   anyway, probably through cycle detection, there's a small chance that
   the original thread finished more-or-less at the same time if the
   original thing blocking load completed. We solve this now by letting
   only one of the threads do the initial registration.
2026-06-08 04:57:26 +02:00
Nintorch 7b70bd5d58 Add support for joypad touchpads
This PR adds the ability to use touchpads on supported controllers, such as DualShock 4 and DualSense.
Currently there's no InputEvent that gets fired when a finger appears/moves on a touchpad.
2026-06-05 22:29:40 +05:00
Edward Chan 212af409ef Exposed bool less_equal greater_equal operators. 2026-06-04 23:00:07 -04:00
Cyklon_3000 f80a9820af Fix error handling for negative values in RandomPCG::rand_weighted 2026-06-04 20:00:52 +02:00
Thaddeus Crews 93d16cc84c Merge pull request #119757 from hpvb/fix-threaded-loader-again
Fix `ResourceLoader::load_threaded_get()` deadlocks
2026-05-29 10:47:41 -05:00
Thaddeus Crews bc209b4f1d Merge pull request #119598 from nikitalita/ensure-bptc-textures
Ensure that BPTC LayeredTexture images get compressed with same signedness
2026-05-29 10:47:39 -05:00
HP van Braam 374102cfbe Fix ResourceLoader::load_threaded_get() deadlocks
This fixes several issues in ResourceLoader
 * When waiting on resources being loaded on the main thread it is
   possible that the resource was waiting on the message queue. Flush
   the message queue in this situation. This was an existing bug.
 * When re-starting a load for deadlock-prevention reasons, and this
   type of resource has nested resources and uses resource changed
   connections we end up with references to resourcese being deleted
   as duplicates in the dependent task. We now keep a reference to these
   resources for the duration of the dependent load task. This closes
   the race but does not entirely eliminate it during intial import.
   This is an existing bug seemingly specific to TileSetSource but there
   might be others.
 * When threads are waiting during teardown we ended up deadlocking
   because the waiting thread would never end up completing. This is a
   bug introduced by f63ab5f
 * When a thread loading a resource ends up calling back into the
   WorkerThreadPool to wait cooperatively it expects that other threads
   complete, or new requests are made, so that work moves forward. If
   all OTHER threads end up blocked by the WorkerThreadPool waiting
   thread then no forward progress can be made anymore. We now solve
   this problem by yielding whenever we are blocked by another task. We
   wake up each every task whenever any progress is made to see if
   further progress can be made. This is a bug introduced by f63ab5f
 * When dependencies get introduced while loading it is possible to form
   a dependency cycle. Normally this isn't a problem but when all
   threads are already waiting when the cycle is introduced no forward
   progress can be made anymore. We now break such cycles. This is a bug
   introduced by f63ab5f
2026-05-29 16:12:02 +02:00
Thaddeus Crews 6137953493 Merge pull request #119651 from Ivorforce/clarify-hash-compare
Clarify `hash_compare` semantics on `Variant`.
2026-05-22 10:57:56 -05:00
Lukas Tenbrink 103b82048f Clarify hash_compare semantics on Variant. 2026-05-22 12:00:02 +02:00
nikitalita 3a49491ff0 Ensure that BPTC LayeredTexture images get compressed with same signedness 2026-05-19 23:04:00 -07:00
Pāvels Nadtočajevs 735827bd78 [Import] Fix empty columns importing as invalid English translation. 2026-05-19 14:48:41 +03:00
Thaddeus Crews 2c5bdd1f9c Merge pull request #119510 from van800/shakhov/fixes
open_dynamic_library(String(), library, &data) should only be called for apple
2026-05-18 11:06:26 -05:00
Thaddeus Crews 8ae90e9442 Merge pull request #119495 from m4gr3d/fix_main_path_use_for_android
[Android] Fix the use of `--main-pack` in template builds
2026-05-18 11:06:25 -05:00
Ivan Šachov e744959de5 avoiding an incorrect ERR_FILE_NOT_FOUND report when the DLL exists but fails to load for another reason
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2026-05-16 21:55:33 +02:00
Fredia Huya-Kouadio 948032c89c [Android] Fix the use of --main-pack 2026-05-15 23:03:54 -07:00
Jan Haller dd29447f44 Warn when registering RefCounted as engine singleton
The `Engine::Singleton` struct stores a raw `Object *`, so registering
a `RefCounted` only works if some external `Ref<>` keeps it alive. This
pattern is fragile and can lead to UB, especially with GDExtension.
2026-05-15 11:00:16 +02:00
Thaddeus Crews afdab2d6b3 Merge pull request #119394 from ManpreetXSingh/fix/double-ref
Fix Resources loaded using `ResourceLoader.load_threaded_get` are never unloaded
2026-05-11 10:59:50 -05:00
Manpreet Singh 9caa8180e9 fix: double ref 2026-05-11 08:08:21 +05:30
Lukas Tenbrink 7852cb7887 Update GDCLASS / GDSOFTCLASS comments. 2026-05-08 23:47:35 +02:00
Lukas Tenbrink 60ab73cd1e Make NodePath copy-on-write, to avoid it changing accidentally by owned copies. 2026-05-07 15:32:58 +02:00
Thaddeus Crews 599f2bd5b9 Merge pull request #118824 from hpvb/fix-118085
Fix a race in `ResourceLoader::load_threaded_request()`
2026-05-06 14:56:33 -05:00
Thaddeus Crews 3033644920 Merge pull request #119254 from Ivorforce/casts-are-so-4.6
Deprecate GDExtension's `object_cast_to` and `classdb_get_class_tag`, in favour of `is_class` casts.
2026-05-06 10:53:32 -05:00
Lukas Tenbrink 7c8df516ba Deprecate object_cast_to and classdb_get_class_tag, in favour of is_class. 2026-05-05 21:44:22 +02:00