Commit Graph

7275 Commits

Author SHA1 Message Date
Hugo Locurcio 492787b134
Prevent folder names with trailing periods from being used automatically
Folder names ending with one or more `.` characters are not allowed
on Windows, so this would break writing logs, shader cache and other
project-specific files. Trailing periods are now stripped in this case.

On non-Windows platforms, this change still applies in the interest
of portability.
2024-06-26 17:42:47 +02:00
Ibrahn Sahir 607c5ec49f Move MIDI parsing up from ALSA driver to platform independent driver.
Aims for more consistent MIDI support across Windows, MacOS, Linux and
to provide a base for adding MIDI drivers for other platforms.
Reworks the MIDIDriverALSAMidi MIDI parsing implementation as a platform
independent version in MIDIDriver::Parser.
Uses MIDIDriver::Parser to provide running status support in MacOS
MIDIDriverCoreMidi.
Collects connected input names at open, ensuring devices indices reported
in events match names in array returned from get_connected_inputs.

Fixes #77035.
Fixes #79811.

With code review changes by: A Thousand Ships (she/her)
<96648715+AThousandShips@users.noreply.github.com>
2024-06-25 16:46:30 +01:00
Rémi Verschelde 6b281c0c07
Merge pull request #93563 from mihe/nothreads-feature
Add `nothreads` feature tag to signify lack of `THREADS_ENABLED`
2024-06-25 10:08:33 +02:00
Rémi Verschelde b9038501db
Merge pull request #90582 from Repiteo/core/remove-macro-_NO_DISCARD_
Core: Replace `_NO_DISCARD_` macro with `[[nodiscard]]`
2024-06-25 10:01:39 +02:00
Mikael Hermansson 53d3d66f9f Add `nothreads` feature tag to signify lack of `THREADS_ENABLED` 2024-06-24 19:52:21 +02:00
Rémi Verschelde f11e8d033d
Remove editor pseudolocalization debug feature
We've seen multiple users enable it by mistake and get utterly confused,
reporting as a bug that the interface text is garbled.

On the other hand we haven't really seen much use of the feature by editor
UI developers, so we can likely simply remove it.

If there's a need eventually, we can re-add it as a command line option
(which is also better than an editor setting as one would typically want
to toggle it during development).
2024-06-24 17:08:26 +02:00
Rémi Verschelde e78dc83ee8
Merge pull request #93540 from RandomShaper/res_load_uncached
`ResourceLoader`: Fix handling of uncached loads
2024-06-24 13:20:24 +02:00
Pedro J. Estébanez 884d1da938 ResourceLoader: Fix handling of uncached loads
- `CACHE_MODE_IGNORE_DEEP` is checked in addition to `CACHE_MODE_IGNORE` to determine if a load is uncached. This avoids crashes in uncached loads due to prematurely freed load tasks.
- Cached load tasks are isolated (not registered in the task map ever). This avoids regular loads from reusing in-flight cached loads, which is not correct.
2024-06-24 11:25:57 +02:00
Raul Santos 175e5bcf4e
Lookup method also in base scripts of a PlaceHolderScriptInstance 2024-06-22 08:11:48 +02:00
Rémi Verschelde c53a4a7f64
Merge pull request #90069 from KoBeWi/file_suicide_prevention_measures
Don't allow copying file into its own path
2024-06-21 16:49:26 +02:00
Rémi Verschelde 74f9f12c71
Merge pull request #92320 from Hilderin/fix-importing-assets-with-csv
Fix reimporting assets with csv in the project
2024-06-21 13:54:35 +02:00
Pedro J. Estébanez 03d14e436b WorkerThreadPool: Refactor deadlock prevention collaboration into a generic mechanism
This is strictly beyond a refactor because it also changes when the mutexes are relocked,
but that's only for extra safety.
2024-06-19 14:01:54 +02:00
Rémi Verschelde 19bf77f666
Merge pull request #91382 from adamscott/sample-player
Add sample playback support
2024-06-19 07:59:07 +02:00
bruvzg dd883bebd4
Improve PR plural translation rules handling. 2024-06-18 19:04:00 +03:00
Rémi Verschelde 0a83e7c5da
Merge pull request #93288 from rune-scape/gdextension-const-stringname-weird
Object: Use const correct `GDExtensionConstStringNamePtr`
2024-06-18 17:59:25 +02:00
Rémi Verschelde a492b32ed0
Merge pull request #93281 from TitanNano/jovan/fix_get_frame_data
Make `profiling_get_frame_data` call the correct GDVIRTUAL method
2024-06-18 17:59:22 +02:00
Adam Scott 52fa4f05f3
Add samples playback support 2024-06-18 11:06:31 -04:00
Rémi Verschelde 470cc59706
Merge pull request #93293 from rune-scape/cleanup-order
Fix cleanup order in `unregister_core_types()`
2024-06-18 14:09:04 +02:00
rune-scape 818fb63f03 fixed cleanup order in `unregister_core_types()` 2024-06-18 00:44:01 -07:00
rune-scape ca916a536a Object: use correct GDExtensionConstStringNamePtr 2024-06-17 19:06:40 -07:00
Jovan Gerodetti 21586da50e Make profiling_get_frame_data call the correct GDVIRTUAL method. 2024-06-18 00:53:25 +02:00
Fabio Alessandrelli ae7045f67e [Crypto] Expose OS.get_entropy 2024-06-17 12:02:37 +02:00
Rémi Verschelde c3336aa110
Merge pull request #93178 from Faless/crypto/expose_tls_options_getters
[Crypto] Expose TLSOptions getters
2024-06-17 10:58:51 +02:00
Fabio Alessandrelli 3639c1f0ca [Crypto] Expose TLSOptions getters 2024-06-14 22:33:10 +02:00
Fabio Alessandrelli 33d0e1c50c [Crypto] Expose get_system_ca_certificates. 2024-06-14 22:27:03 +02:00
Rémi Verschelde 087ef4b942
Merge pull request #93124 from RandomShaper/skull_trio
`ResourceLoader`: Let the caller thread use its own message queue override
2024-06-14 17:13:38 +02:00
Rémi Verschelde 75eb8ad510
Merge pull request #93091 from RandomShaper/remove_false_safety
Remove no longer needed thread safety measures
2024-06-14 17:13:31 +02:00
Rémi Verschelde 08a21fda8d
Merge pull request #93082 from RandomShaper/fix_err_deadlock
ResourceLoader: Avoid deadlock when awaiting a loader thread that failed early
2024-06-14 17:13:28 +02:00
Pedro J. Estébanez cc6f5d1a7a ResourceLoader: Let the caller thread use its own message queue override 2024-06-13 10:31:11 +02:00
Pedro J. Estébanez 21c03d1956 WorkerThreadPool: Fix thread message queue not restored after overridden in a task
Also, simplifies the thread override teardown in MessageQueue.
2024-06-13 10:31:08 +02:00
bruvzg e651421905
[TextServer, GDExtension] Fix building text servers as GDExtension, expose new/changed low-level methods to GDExtension API. 2024-06-12 19:30:19 +03:00
Pedro J. Estébanez b6994a414d Remove no longer needed thread safety measures
This is basically a revertion of commit 84b85d894c.
2024-06-12 18:10:11 +02:00
Pedro J. Estébanez bdcceef0e2 ResourceLoader: Avoid deadlock when awaiting a loader thread that failed early 2024-06-12 13:49:37 +02:00
Rémi Verschelde 5bab95a556
Merge pull request #92827 from raulsntos/core/node-to_string
Use GDExtension `to_string` in Node
2024-06-12 10:00:29 +02:00
Hilderin f1099ab943 Fix reimporting assets with csv in the project 2024-06-11 17:04:15 -04:00
Raul Santos 29bf60cc02
Use GDExtension `to_string` in Node
Matches the `Object::to_string` implementation.
2024-06-11 17:40:51 +02:00
Rémi Verschelde 4629845ead
Merge pull request #92718 from jsjtxietian/importer-duplicate
Fix same importer will be added multiple times in `get_importers_for_extension`
2024-06-11 11:51:06 +02:00
Rémi Verschelde e4fa8543ea
Revert "Fix FileSystem dock won't show any file folders"
This reverts commit 72856d633a.

Fixes #93022.
2024-06-11 11:46:35 +02:00
Rémi Verschelde 94929439b6
Revert "Fix method name for custom callable"
This reverts commit e88095ed8f.

Fixes #92695.
2024-06-11 11:02:03 +02:00
Rémi Verschelde 0a9f2d2262
Merge pull request #92650 from Hilderin/fix-fileSystem-dock-wont-show-any-file-folders
Fix FileSystem dock won't show any file folders
2024-06-11 10:48:46 +02:00
Hilderin 72856d633a Fix FileSystem dock won't show any file folders 2024-06-10 19:54:37 -04:00
Chris Cranford 8577340501 Expose several EngineDebugger methods and signals as plugin callbacks 2024-06-10 19:46:23 -04:00
bruvzg d8e1ab085a
[Windows] Fix 32-bit MinGW LTO build. 2024-06-04 13:46:03 +03:00
Rémi Verschelde 7b63ac488e
Merge pull request #92722 from rune-scape/fix-callable-crash
Fix callable not clearing freed pointer
2024-06-04 10:16:14 +02:00
jsjtxietian 7552d242a3 Fix same importer will be added multiple times in `get_importers_for_extension` 2024-06-03 17:28:46 +08:00
Rémi Verschelde ef886b0a41
Merge pull request #92426 from RandomShaper/fix_ed_toast_mt
Avoid editor error reporting using resource loader thread's call queues
2024-06-03 11:20:50 +02:00
Rémi Verschelde 41e762ca29
Merge pull request #91454 from akien-mga/coverity-checks
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
2024-06-03 10:35:38 +02:00
rune-scape 4463e7dee9 fix callable not clearing freed pointer 2024-06-02 21:22:16 -07:00
Thaddeus Crews 05203b6a43
SCons: Fix `mono` dependency 2024-06-01 16:37:54 -05:00
Rémi Verschelde 62120c7841
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
- Fixes #88630.
- Fixes #92578.
2024-05-31 09:55:02 +02:00
Pedro J. Estébanez f61c63e3a1 Avoid editor error reporting using resource loader thread's call queues 2024-05-31 09:42:37 +02:00
Rémi Verschelde be2c5e66f4
Merge pull request #92201 from bruvzg/input_flush
Clean `Input::frame_parsed_events` before de-initialising scripting languages to ensure no script created events exist at the exit.
2024-05-30 15:41:56 +02:00
kobewi 17d3f26e5d Add event_index to InputEventAction 2024-05-30 12:51:15 +02:00
bruvzg 2c9df769ad
Clean Input::frame_parsed_events before de-initialising scripting languages to ensure no script created events exist at the exit. 2024-05-30 13:23:00 +03:00
Rémi Verschelde 9d4a736d0c
Merge pull request #91502 from lyuma/gdextension_open_library_compat
Bind compatibility GDExtension methods removed in #88418
2024-05-30 11:47:43 +02:00
Rémi Verschelde b8f3c5e2ab
Merge pull request #92427 from AThousandShips/bind_go_away
Replace `.bind(...).call_deferred()` with `.call_deferred(...)`
2024-05-28 15:50:01 +02:00
Rémi Verschelde 4808f24312
Merge pull request #92350 from 4d49/undo-redo-fix-callable-name
Fix `UndoRedo` method name for custom `Callable`
2024-05-28 15:49:26 +02:00
A Thousand Ships 4ed62665a2
Replace `.bind(...).call_deferred()` with `.call_deferred(...)` 2024-05-27 13:29:57 +02:00
Mansur Isaev e88095ed8f Fix method name for custom callable 2024-05-25 10:23:10 +04:00
Mikael Hermansson e312f147aa Fix `ClassDB` not checking for `API_EDITOR_EXTENSION` 2024-05-25 00:23:12 +02:00
Danil Alexeev 49594d8c41
Optimize `Color::find_named_color()` 2024-05-23 15:19:19 +03:00
Rémi Verschelde c40c89f94c
Merge pull request #90457 from Chubercik/ruff-formatter
Replace `black` formatter with `ruff`
2024-05-22 09:26:42 +02:00
Jakub Marcowski d9f8ef68df
Update pre-commit hooks configuration to use `ruff` instead of `black` 2024-05-21 18:02:29 -05:00
David Snopek 62f9365b21 Don't use `ERR_PRINT_ONCE()` for runtime class error because it will hide errors 2024-05-21 13:55:56 -05:00
lawnjelly 331ecf3ca8 Clarify is_polygon_clockwise() coordinate system
The function assumes a normal Cartesian coordinate system.
2024-05-20 18:34:45 +01:00
Rémi Verschelde 944b95e1a5
Merge pull request #91897 from RandomShaper/res_unreg_if_true
Add an identity check to resource unregistration from cache
2024-05-16 09:32:03 +02:00
Rémi Verschelde e63b5ba9e4
Merge pull request #91416 from Calinou/d3d12-sdk-update-install-script
Update dependencies in D3D12 SDK installer script
2024-05-15 13:51:31 +02:00
Rémi Verschelde 527bf78486
Merge pull request #91955 from Repiteo/core/variant-class-initializer
Core: Readd Variant class initializer, fix comment
2024-05-15 12:10:03 +02:00
Thaddeus Crews 7599a7b719
Core: Readd Variant class initializer, fix comment 2024-05-14 12:20:40 -05:00
kobewi 59f05ed31a Cleanup unused/underused singleton StringNames 2024-05-14 18:18:29 +02:00
Rémi Verschelde bdefe53992
Merge pull request #91909 from KoBeWi/have_fun_reviewing_this
Use Core/Scene stringnames consistently
2024-05-14 12:07:03 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde 5cb9a748d6
Merge pull request #91630 from RandomShaper/enh_mat_sh_update
Let materials' shaders update happen on loader threads
2024-05-13 17:32:11 +02:00
Rémi Verschelde 3585c2e8f9
Merge pull request #91870 from scgm0/fix_disabled_classes
SCons: Fix generation of `disabled_classes.gen.h` after #91624
2024-05-13 12:05:59 +02:00
Pedro J. Estébanez b70afac286 Add an identity check to resource unregistration from cache
This is needed because resources loaded with CACHE_MODE_IGNORE still have path_cache set.
2024-05-13 11:55:50 +02:00
scgm0 973d3a472d
SCons: Fix generation of `disabled_classes.gen.h` after #91624 2024-05-13 11:25:29 +02:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
Rémi Verschelde 5e28260a10
Merge pull request #91806 from dsnopek/gdextension-shutdown-crash
GDExtension: Prevent crash during shutdown as singletons are deleted
2024-05-11 12:38:30 +02:00
Rémi Verschelde 816f6170fa
Merge pull request #86755 from lawnjelly/aabb_intersect_fix
Fix AABB Ray intersection - return inside
2024-05-11 12:38:08 +02:00
David Snopek 14506a4282 GDExtension: Prevent crash during shutdown as singletons are deleted 2024-05-10 13:17:36 -05:00
Rémi Verschelde e6780b54bb
Merge pull request #91727 from RandomShaper/cmd_queue_prealloc
`CommandQueueMT`: Pre-allocate memory to avoid a bunch of allocations at startup
2024-05-10 09:55:57 +02:00
Rémi Verschelde 6fcdd24468
Merge pull request #91624 from Repiteo/scons/native-generation
SCons: Generate all scripts natively, implement wrapper function
2024-05-10 09:55:51 +02:00
lawnjelly b35264ad95 Fix AABB Ray intersection - return inside
* Separates find_intersects from test_intersects for rays, and wraps the former.
* Changes parameter name to "r_intersection_point".
* Fixes broken old version which returned per axis t.
* Returns whether the ray origin is within the AABB.
* Returns intersection point when origin outside.
* Returns "backtracking" intersection point when inside.
* Returns sensible normal when inside.
* Returns valid results on borders.
* Returns robust results dealing with floating point error.

Co-authored-by: Claire Blackshaw <evilkimau@gmail.com>
2024-05-09 20:41:19 +01:00
Pedro J. Estébanez c0529dc4f2 CommandQueueMT: Pre-allocate memory to avoid a bunch of allocations at startup 2024-05-09 11:51:07 +02:00
Rémi Verschelde c4279fe3e0
Merge pull request #91725 from RandomShaper/cmd_queue_avoid_skip
`CommandQueueMT`: Fix sync command awaiters missing the chance
2024-05-09 02:06:34 +02:00
Pedro J. Estébanez a4014a2f78 CommandQueueMT: Fix sync command awaiters missing the chance 2024-05-08 18:56:58 +02:00
Pedro J. Estébanez 1589433e8f Apply additional fixes to servers' threading 2024-05-08 17:41:40 +02:00
Pedro J. Estébanez 6f0760beb3 CommandQueueMT: Fix command cleanup (revive destructor call + plus handle buffer realloc) 2024-05-08 17:41:40 +02:00
Pedro J. Estébanez b834037841 Object: Add missing lock 2024-05-08 17:41:40 +02:00
Rémi Verschelde a9a1d0a162
Merge pull request #91619 from AThousandShips/find_improve
Replace `find` with `contains/has` where applicable
2024-05-08 14:35:44 +02:00
A Thousand Ships b4c6cc7d82
[Core] Add case-insensitive `String::containsn` 2024-05-08 12:48:01 +02:00
A Thousand Ships a0dbdcc3ab
Replace `find` with `contains/has` where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde 17a81260cb
Merge pull request #91684 from Chubercik/embree4_aftermath
Fix `builtin_embree=no` build linking the wrong version of Embree
2024-05-08 09:54:24 +02:00
Rémi Verschelde 63ed5749ac
Merge pull request #91104 from RandomShaper/simple_type_cpp
Redefine `GetSimpleTypeT<>` in terms of `<type_traits>`
2024-05-08 09:54:16 +02:00
Jakub Marcowski 7699d678c4
Fix `builtin_embree=no` build linking the wrong version of Embree 2024-05-08 00:40:45 +02:00
Thaddeus Crews 34fb3f7730
SCons: Generate all scripts natively 2024-05-07 15:30:45 -05:00
Hugo Locurcio 47ac22486d
Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +02:00
Wilson E. Alvarez d4154dbc55
Add const char * overloads to String class
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-05-07 10:53:00 -04:00
Lyuma 0e5e743258 Bind compatibility GDExtension methods removed in 88418
These functions were likely not used, but we must ensure they are still bound to ensure API stability.
2024-05-07 01:36:36 -07:00
Rémi Verschelde 4b070e8031
Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00