Commit Graph

289 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
Thaddeus Crews 780cf03051
Merge pull request #104556 from Ivorforce/string-extend-instead-of-parse
Use `append_` instead of `parse_` for `String` methods.
2025-03-29 10:16:33 +07:00
A Thousand Ships 5cc0539961
[Navigation] Create a dedicated 2D navigation server
* Add a dedicated 2D server
* Create dedicated tests
* Split performance metrics between 2D and 3D
* Rename the 3D only server module
2025-03-29 12:10:50 +07:00
Michael Alexsander 5ad414d046
Allow to compile templates without physics servers 2025-03-28 11:00:44 +07:00
Rémi Verschelde e81eb3f1e9
Merge pull request #102354 from YYF233333/style_iterator
Use iterator pattern instead of manually traverse `List::Element *`
2025-03-28 14:31:40 +07:00
Rémi Verschelde 4e1e99142d
Merge pull request #102126 from Ivorforce/optimize-get_setting_with_override
Optimize `ProjectSettings::get_setting_with_override` / `GLOBAL_GET` by avoiding repeated dict lookups.
2025-03-28 14:31:36 +07:00
Yyf2333 22b5ec17fb Using iterator pattern instead of List::Element *.
Co-authored-by: Adam Scott <ascott.ca@gmail.com>
2025-03-28 13:29:15 +07:00
Lukas Tenbrink ffa6ef220b Use `append_` instead of `parse_` for `String` methods. 2025-03-27 17:51:02 +07:00
kobewi 602806101c Improve error messages for add_property_info() 2025-03-20 22:39:09 +07:00
Thaddeus Crews c8a94993bf
Merge pull request #103961 from bruvzg/win_pos_sync
Sync `display/window/size/initial_position_type` and `Window::WINDOW_INITIAL_POSITION_` enum.
2025-03-18 14:42:33 +07:00
Aaron Franke 97ee05e9b7
Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp 2025-03-12 11:11:38 +07:00
Thaddeus Crews 56bc9bc2f4
Merge pull request #102984 from syntaxerror247/volume-buttons
Android: enable support for volume button events
2025-03-11 09:34:46 +07:00
Pāvels Nadtočajevs d990f594a0
Sync `display/window/size/initial_position_type` and `Window::WINDOW_INITIAL_POSITION_` enum. 2025-03-11 08:33:02 +07:00
A Thousand Ships 331a43a9d8
Add `String::remove_char(s)` methods for performance and convenience 2025-03-10 13:19:28 +07:00
A Thousand Ships 466590d0ec
Use `get_slicec` instead of `get_slice` for single character splitters 2025-03-08 20:36:37 +07:00
A Thousand Ships 5113022dfe
Clean up some uses of `String::substr`
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +07:00
Anish Mishra 5ce16dfc69 Android: enable support for volume button events
- Enable events KEY_VOLUMEUP and KEY_VOLUMEDOWN on Android.

- Adds a project setting to override volume buttons. It would disable system volume changes when the buttons are used within the project.
2025-02-28 09:47:22 +07:00
Rémi Verschelde 672fe2487f
Input: Change default deadzone back to 0.5 for `ui_*` actions and axis `pressed` state
Fixes #103360.
Partial revert of changes in #97281 and #99135.
2025-02-27 17:30:48 +07:00
Thaddeus Crews 24dccd40c1
Merge pull request #99479 from Sauermann/fix-remove-project-conversion
Remove temporary project conversion
2025-02-18 07:55:56 +07:00
Lukas Tenbrink 60443b1ae6 Optimize `ProjectSettings::get_setting_with_override` / `GLOBAL_GET` by avoiding repeated dict lookups. 2025-01-29 14:11:15 +07:00
Pedro J. Estébanez 318af42020 Include more attributes in the global class names cache 2025-01-29 09:39:50 +07:00
Rie d17ce4c37e Fix "res://" being replaced by resource packs in the editor and on Android 2025-01-15 11:20:46 +07:00
axunes 50b90604af macOS: search for project file in .app resources 2025-01-08 01:59:00 +07:00
Hugo Locurcio 62c17911ea Add more property hint ranges for project settings
- Tweak property hint ranges for some networking settings to ensure
  the minimum values don't break the debugger entirely.
- Ensure shader time rollover is set to at least 1, as 0 causes a division by
  zero to occur.

All relevant project settings are now covered by a range hint.
2024-12-23 18:22:32 +07:00
Thaddeus Crews bf9ef5f8a5
Merge pull request #100564 from YYF233333/iwyu
Remove unused headers in core
2024-12-19 19:59:55 +07:00
Yufeng Ying be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +07:00
HP van Braam 240f510fa7 Core ubsan fixes
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.

These fixes apply only to errors reported, and caused by, core/

The following things have been changed:

* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
  the API cannot pass in wrongly-sized values leading to potential stack
  corruption.
* Ensure that memcpy is never called with invalid or null pointers as
  this is undefined behavior, and when the engine is built with
  optimizations turned on leads to memory corruption and hard to debug
  crashes.
* Replace enum values only used as static values with constexpr static
  const values instead. This has no runtime overhead. This makes it so
  that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
  same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
  verify the new behavior. The behavior doesn't quite match master in
  particulary for negative doubles as the original code tried to cast -inf
  to an int. This then led to negative doubles losing all but one of
  their decimal points when serializing. Behavior in GDScript remains
  unchanged.
2024-12-18 14:31:12 +07:00
Markus Sauermann ee2930cad4 Remove temporary project conversion
This project conversion should be removed before the next stable release,
because it affects only projects opened during dev-builds.
2024-12-14 00:37:47 +07:00
Dario 054891de04 Implement buffer_get_data_async and texture_get_data_async. 2024-12-11 11:55:23 +07:00
Thaddeus Crews 1719f8ed3d
Merge pull request #99834 from kiroxas/passLengthToParseUTF8
Ensure `parse_utf8` has length of string passed in when available
2024-12-03 14:41:06 +07:00
Thaddeus Crews a135a6478a
Merge pull request #98383 from RandomShaper/deprecate_unsafe_th_rend
Deprecate the pointless unsafe threading model for rendering
2024-12-03 14:40:56 +07:00
Kiro 83d4bde0a2 When calling code has length of string, pass it to parse_utf8 2024-12-01 08:31:22 +07:00
Markus Sauermann bc5e2f9b96 Revert "Fix InputEvent device id clash" and add a compatibility function
This reverts commit 916d480686.

Revert "Fix InputEvent crash when opening project"
This reverts commit abb9c0f171.

Introduce a compatibility function for projects affected by the
device id clash reversal

Since the reverted PR introduced changes in the project.godot
file, it seems prudent to introduce a compatibility function for
such affected projects.
2024-11-20 09:18:55 +07:00
Thaddeus Crews 0dda6a974c
Merge pull request #99286 from KoBeWi/uid_in_a_path_factory
Support uid:// in more places
2024-11-18 09:23:44 +07:00
A Thousand Ships 68f638cf02
Use `(r)find_char` instead of `(r)find` for single characters 2024-11-17 10:02:18 +07:00
kobewi 3b6705a641 Support uid:// in more places 2024-11-16 21:43:18 +07:00
Pedro J. Estébanez a46ea9d064 Deprecate the pointless unsafe threading model for rendering 2024-11-14 10:43:29 +07:00
Malcolm Anderson 829dade53b Replace default deadzone magic number with named constant 2024-11-12 10:11:52 +07:00
A Thousand Ships 38f9769bc6
[Core] Improve error messages with `vformat` 2024-10-30 15:55:51 +07:00
Clay John 748f4079e3
Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebased
Add Swappy & Pre-Transformed Swapchain
2024-10-29 12:34:40 +07:00
Matias N. Goldberg aaa0e2fddf Add Swappy & Pre-Transformed Swapchain
- Adds Swappy for Android for stable frame pacing
- Implements pre-transformed Swapchain so that Godot's compositor is in
charge of rotating the screen instead of Android's compositor
(performance optimization for phones that don't have HW rotator)

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.

Changes from original PR:

- Removed "display/window/frame_pacing/android/target_frame_rate" option
to use Engine::get_max_fps instead.
- Target framerate can be changed at runtime using Engine::set_max_fps.
- Swappy is enabled by default.
- Added documentation.
- enable_auto_swap setting is replaced with swappy_mode.
2024-10-28 18:55:37 +07:00
kobewi abb9c0f171 Fix InputEvent crash when opening project 2024-10-24 17:05:05 +07:00
Thaddeus Crews 7dbea98c49
Merge pull request #97005 from Repiteo/core/window-corner-style
Core: Add `DisplayServer` flag for sharp corners
2024-10-21 16:39:25 +07:00
Thaddeus Crews ecc2eb73fc
Merge pull request #97707 from Sauermann/fix-input-device-clash
Fix `InputEvent` device id clash
2024-10-21 16:39:10 +07:00
Markus Sauermann 916d480686 Fix InputEvent device id clash
`InputMap::ALL_DEVICES` and `InputEvent::DEVICE_ID_EMULATION` have the
same value `-1`.

Change value of `InputMap::All_DEVICES` so that it's different from
`InputEvent::DEVICE_ID_EMULATION`. `InputEvent::DEVICE_ID_EMULATION`
is part of the API and can't be changed without potentially breaking
projects.

Gather all special device constants in a single location inside
`InputEvent`.

Add a converter to project settings, that takes care of adjusting
project files during loading.
2024-10-20 21:56:41 +07:00
Thaddeus Crews f8c4a683d7
Core: Add `DisplayServer` flag for sharp corners 2024-10-18 11:20:21 +07:00
kobewi b9d25580ce Fix implementation of property_can_revert() in various classes 2024-10-04 23:02:04 +07:00
bruvzg 794920b1ff
Partially revert 96780, remove warnings from project/editor settings `_get`. 2024-10-04 19:13:03 +07:00
Roman Morozov d532eecc81 Changed the default deadzone value for new actions from 0.5 to 0.2 2024-10-01 16:47:44 +07:00
kobewi 41d0971c7e Fix path error when saving ProjectSettings 2024-09-17 15:05:20 +07:00
Rémi Verschelde 012ccbc301
Merge pull request #95048 from KoBeWi/keep_the_party_going
Add `keep_screen_on` editor setting
2024-08-27 22:27:35 +07:00
Rémi Verschelde 82adfebcf8
Merge pull request #94799 from m4gr3d/memory_allocation_cleanup_and_optimizations
Android memory cleanup and optimizations
2024-08-16 23:45:39 +07:00
Fredia Huya-Kouadio a57a99f5bc Memory cleanup and optimizations
- Returns an empty list when there's not registered plugins, thus preventing the creation of spurious iterator objects

- Inline `Godot#getRotatedValues(...)` given it only had a single caller. This allows to remove the allocation of a float array on each call and replace it with float variables

- Disable sensor events by default. Sensor events can fired at 10-100s Hz taking cpu and memory resources. Now the use of sensor data is behind a project setting allowing projects that have use of it to enable it, while other projects don't pay the cost for a feature they don't use

- Create a pool of specialized input `Runnable` objects to prevent spurious, unbounded `Runnable` allocations

- Disable showing the boot logo for Android XR projects

- Delete locale references of jni strings
2024-08-16 09:27:41 +07:00
bruvzg 69d52ed081
[.NET] Move search in files extension list definition to be after Scene level module init. 2024-08-14 00:16:09 +07:00
kobewi ab4c23583a Add keep_screen_on editor setting 2024-08-02 03:44:29 +07:00
bruvzg 25f78a5eb6
Replace .NET detection code with `ClassDB::class_exists("CSharpScript")`. 2024-07-23 23:46:14 +07:00
Danil Alexeev 110c4d4067
GDScript: Fix "Mismatched external parser" for autoloads 2024-07-09 16:16:45 +07:00
Rémi Verschelde 7197678df2
Merge pull request #91551 from m4rr5/configure_timestamp_query_elements
Add a project setting to configure the maximum number of timestamps.
2024-07-07 12:38:19 +07:00
Adam Scott 52fa4f05f3
Add samples playback support 2024-06-18 11:06:31 +07: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 +07:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +07:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +07:00
Hugo Locurcio 47ac22486d
Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +07:00
A Thousand Ships 86de59d60a
[Core] Add `LocalVector::has` for convenience 2024-05-06 18:03:37 +07:00
Marcel Offermans 2bb34a4489 Added a project setting to configure the maximum amount of timestamps, with a description and a reference to the setting when the limit is hit and an ERR_FAIL_COND is hit. 2024-05-05 09:09:04 +07:00
Rémi Verschelde bd598d5657
Merge pull request #85678 from KoBeWi/editor_walktime
Add separate feature tags for editor runtime
2024-04-26 15:13:16 +07:00
kobewi 3ebb5b84a0 Add separate feature tags for editor runtime 2024-04-26 14:44:38 +07:00
kobewi 4324d01c8e Allow loading custom ProjectSettings instance 2024-04-26 11:34:37 +07:00
Haoyu Qiu 8d1cb7e74c Add project setting for root node auto translate mode 2024-04-16 11:02:04 +07:00
A Thousand Ships 64146cb7f3
[Core] Add iteration support to `Array` 2024-04-10 14:49:34 +07:00
Rémi Verschelde 7d96ec4f9d
Merge pull request #88329 from ManpreetXSingh/key-window-menu
Windows: Add support for enabling Alt+Space menu and fix borderless maximize
2024-04-08 11:20:05 +07:00
Manpreet Singh 329d04d331 Windows: Add alt+space menu and fix window modes 2024-04-06 16:26:19 +07:00
Dario ecaafa6001 Add toggle for enabling or disabling RenderingDevice's pipeline cache. 2024-04-05 13:14:07 +07:00
lawnjelly 691854d589 Jitter raster occlusion camera to reduce false positives.
Due to the low resolution of the occlusion buffer, small gaps between occluders can be closed and incorrectly occlude instances which should show through the gaps. To ameliorate this problem, this PR jitters the occlusion buffer over time, making it more likely an instance will be seen through a gap. This is used in conjunction with an occlusion timer per instance, to prevent instances flickering on and off rapidly.
2024-04-03 12:18:45 +07:00
David Nikdel 5e6adb4a2d Merge uid_cache.bin and global_script_class_cache.cfg after mounting PCKs
fixes godotengine#82061
fixes godotengine#61556

Also, distinguish between main pack and DLC packs.
It's desirable to downloaded content to be as small as possible. This change avoids bloating non-main pack files with new versions of resources that are all read on startup and never used again. They have no effect if loaded after startup.
- project.godot/project.binary file
- extension_list.cfg
- app icon and boot_splash
- .ico and .icns files (these can still be opted in for DLC by listing them explicitly in the include filter)
2024-03-06 12:14:21 +07:00
nazarii ea8c261cc6 [Core] Move includes from project_settings.h into project_settings.cpp 2024-03-04 15:37:30 +07:00
Rémi Verschelde 0394328a71
Merge pull request #86758 from Mickeon/autocompletion-project-settings
Add autocompletion for ProjectSettings' methods
2024-03-01 17:21:59 +07:00
Micky 404b2bf9c2 Add autocompletion for ProjectSettings' methods 2024-02-29 20:50:22 +07:00
Michael Alexsander d70c45b5c8
Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 +07:00
Robert Yevdokimov 13e82094ee Remove word duplicates in comments and strings, and fix casing and punctuation 2024-02-23 17:28:28 +07:00
Rémi Verschelde b6ef996eb7
Merge pull request #86608 from TokageItLab/add-warn-setting-anim
Add some options to Project Settings to silence warnings in AnimationMixer caching
2024-02-17 00:22:52 +07:00
Rémi Verschelde ef5d6ccfb7
Merge pull request #86966 from Muller-Castro/value2ref-core
Add const lvalue ref to `core/*` container parameters
2024-02-15 15:44:43 +07:00
Anatoli Babenia e25cfffc7f Add `--no-header` option to clean output
* Do not print empty line when header is disabled
* Do not print Vulcan header
* Also add "Print header" project setting (default On)
  (suggested by @kaissouDev)
* Add docs for the project setting
  (with suggestions by @Mickeon and @akien-mga)

Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-15 14:10:11 +07:00
Muller-Castro a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 +07:00
Silc Lizard (Tokage) Renew dc4b7bc364 Add option to silence some warnings in AnimationMixer caching 2024-02-14 14:48:02 +07:00
kobewi 1b2c7bfe77 Allow to set custom feature tags for testing 2024-02-13 17:38:45 +07:00
Dario 73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 +07:00
Adam Scott 344ee36bfe
Fix `display/window/size/window_{width,height}_override` set `0` 2024-02-03 12:31:50 +07:00
Rémi Verschelde ca7fb29203
Merge pull request #84800 from gshadows/fix_options_range
Fix unlimited project option ranges that could cause crashes.
2024-01-03 09:59:31 +07:00
Rémi Verschelde 14b1bb47a7
Merge pull request #86570 from RandomShaper/remove_traces_of_rid_prealloc
Remove traces of the extinct RID preallocate feature
2024-01-02 18:05:41 +07:00
bruvzg 126a763f7a
[D3D12] Dynamically load Agility SDK. 2024-01-02 17:15:59 +07:00
Pedro J. Estébanez c217041afd Remove traces of the extinct RID preallocate feature 2023-12-28 10:18:05 +07:00
G-Shadow cbc8ae660c Fix unlimited project option ranges that could cause crashes. 2023-12-22 09:14:45 +07:00
Yuri Sizov 3a8524dd92
Merge pull request #83452 from RandomShaper/rd_common
Split `RenderingDevice` into API-agnostic and `RenderingDeviceDriver` parts
2023-12-20 20:09:18 +07:00
Pedro J. Estébanez 12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +07:00
Stanislav Labzyuk 958699a0c4 Implement project-wide node groups 2023-12-19 18:07:19 +07:00
Yuri Sizov 02d4579fa2 Merge pull request #85000 from bruvzg/ed_ui_direction
[Editor] Add option to override editor UI layout direction.
2023-12-19 13:01:35 +07:00
Pedro J. Estébanez 2f47c57385 Add Direct3D 12 RenderingDevice implementation 2023-12-12 19:10:04 +07:00
bruvzg 932174fedf
[Editor] Add option to override editor UI layout direction. 2023-11-17 14:56:45 +07:00
Rémi Verschelde ba713c80df
Fix various typos with codespell
Using 2.2.7.dev51+geb4a58fe.
2023-11-11 23:01:24 +07:00
Rémi Verschelde e6d488f233
Merge pull request #81196 from georgwacker/add-audiosession-options
Add project settings for AVAudioSessionCategory on iOS
2023-10-17 16:12:49 +07:00