Stuart Carnie
00e1fdec2c
MacOS: Embedded window support.
2025-05-06 06:09:05 +10:00
kobewi
5af4bef46f
Inline static variables (part 1)
2025-04-29 18:10:44 +02:00
Thaddeus Crews
dc9c34f0c6
SCons: Add enum conversion warning
2025-04-26 12:06:20 -05:00
Thaddeus Crews
0d267e7b1e
Core: Add dedicated BitField template
2025-04-11 11:53:26 -05:00
Pāvels Nadtočajevs
b106dfd4f9
Base accessibility API.
2025-04-08 20:14:28 +03:00
Thaddeus Crews
70d7a77a9a
Merge pull request #98653 from Repiteo/scons/pretty-builders
...
SCons: Make builders prettier, utilize `constexpr`
2025-03-11 19:54:47 -05:00
Thaddeus Crews
be429eb404
SCons: Make builders prettier, utilize constexpr
2025-03-11 18:31:20 -05:00
Konrad Gadzina
e6f812c056
Modify color in ColorPicker with keyboard or joypad
2025-03-11 22:41:41 +01:00
Thaddeus Crews
78c9f8ddd9
Merge pull request #103906 from adamscott/revert-builtin-gui-license-notice
...
Revert "Add built-in GUI to display license notices"
2025-03-10 21:05:58 -05:00
Adam Scott
1d325847f3
Revert "Add built-in GUI to display license notices"
...
This reverts commit daa6198925 .
2025-03-10 10:33:12 -04:00
A Thousand Ships
331a43a9d8
Add String::remove_char(s) methods for performance and convenience
2025-03-10 13:19:28 +01:00
A Thousand Ships
466590d0ec
Use get_slicec instead of get_slice for single character splitters
2025-03-08 20:36:37 +01:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once
2025-03-07 17:33:47 -06:00
Thaddeus Crews
3c43508ed7
Merge pull request #102427 from AThousandShips/fix_substr
...
Clean up some uses of `String::substr`
2025-03-07 15:12:33 -06:00
Thaddeus Crews
0c6efe572e
Merge pull request #79599 from Calinou/add-license-notices-gui
...
Add built-in GUI to display license notices
2025-03-07 15:12:29 -06:00
Thaddeus Crews
c937b6d180
Merge pull request #102419 from Ivorforce/std-size
...
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-03-07 15:12:25 -06: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 +01: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 +01:00
Anish Mishra
93bababb8c
Android: Inform that sensors must be enabled in ProjectSettings
2025-02-21 23:04:01 +05:30
Lukas Tenbrink
e34f1f504c
Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
2025-02-07 14:57:48 +01:00
Adam Scott
47f553ae0b
Delegate to the DisplayServer the task of handling mouse_mode
...
- Add `MOUSE_MODE_MAX` and various index checks
2025-01-28 11:22:27 -05:00
Hugo Locurcio
daa6198925
Add built-in GUI to display license notices
...
Press Ctrl/Cmd + Shift + L (`ui_toggle_licenses_dialog` built-in action)
to show/hide the notices dialog.
The dialog can be shown via script using
`SceneTree.licenses_dialog_visible = true|false`.
Co-authored-by: MewPurPur <mew.pur.pur@abv.bg >
2025-01-27 18:35:04 +01:00
Thaddeus Crews
49481c12bc
Merge pull request #98792 from MJacred/fix_remove_joy_mapping
...
Fix `Input::remove_joy_mapping`
2025-01-17 10:16:44 -06:00
MJacred
8e75fae49e
Ue an array removed_idx
2025-01-14 12:09:16 +01:00
MJacred
f355382ef5
Updating the index after the first mapping record of p_guid requires a second loop
2025-01-13 16:55:26 +01:00
MJacred
e98f3a6bf0
Apply feedback
2025-01-13 16:23:55 +01:00
MJacred
f7c6a8659a
Apply feedback + Remove unused variable uid in parse_mapping()
2025-01-13 11:43:25 +01:00
Rémi Verschelde
be4678b836
Merge pull request #95750 from mosquitochang/fix-input-event-get-index
...
Fix `InputMap::event_get_index` to handle unmatched events correctly
2025-01-06 22:46:37 +01:00
Thaddeus Crews
3c304ab7cc
Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers
...
[Core,Drivers] Improve use of `Ref.is_null/valid`
2024-12-23 11:14:58 -06:00
Thaddeus Crews
bf9ef5f8a5
Merge pull request #100564 from YYF233333/iwyu
...
Remove unused headers in core
2024-12-19 19:59:55 -06:00
Yufeng Ying
be86ce3103
Apply iwyu suggestion in core.
2024-12-19 00:43:47 +08:00
Rémi Verschelde
851d8e49e8
Merge pull request #100386 from hpvb/core-ubsan
...
Core: Fix UBSAN reports
2024-12-18 17:23:32 +01: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 +01:00
MJacred
40832387ce
Fix Input::remove_joy_mapping
...
Erasing a joypad mapping can invalidate other attached joypads and the fallback mapping guid
2024-12-16 20:27:33 +01:00
MJacred
01a2726c59
Get joypad's vendor ID, product ID, and name on Windows
2024-12-15 23:59:11 +01:00
Hilderin
4e19ab8afe
Fix connecting a signal with a double click is too difficult
...
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru >
2024-12-14 16:18:34 +03:00
Yelloween
98a23136d5
Fix missing event metadata in _input() with Input.parse_input_event()
...
Use merge_meta_from() for metadata copying.
Fixed include order
Removed unnecessary line
2024-12-06 22:08:16 +03:00
Thaddeus Crews
8b5f181d86
Merge pull request #90723 from Calinou/textedit-autocompletion-always-replace-if-not-shift
...
Make TextEdit autocompletion replace word unless Shift is held
2024-11-27 10:47:24 -06: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 +01:00
Thaddeus Crews
7ac9d7fec9
Merge pull request #99304 from emanvidmaker/Update-gamecontrollerdb.txt-2024
...
Sync controller mappings DB with SDL2 community repo [Nov 2024]
2024-11-18 09:23:47 -06:00
A Thousand Ships
68f638cf02
Use (r)find_char instead of (r)find for single characters
2024-11-17 10:02:18 +01:00
Emanuel Acosta Gonzalez (emanvidmaker)
f2d58f5d76
Sync controller mappings DB with SDL2 community repo [Nov 2024]
...
Synced with cfc2bffe0a
2024-11-15 21:56:25 -04:00
Malcolm Anderson
829dade53b
Replace default deadzone magic number with named constant
2024-11-12 10:11:52 -08:00
Thaddeus Crews
bb5f390fb9
Style: Apply clang-tidy fixes (superficial)
...
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
A Thousand Ships
ec650a2f09
[Core,Drivers] Improve use of Ref.is_null/valid
...
Use `is_null` over `!is_valid` and vice versa.
2024-11-01 16:50:11 +01:00
Thaddeus Crews
163bf94d04
Merge pull request #98091 from AThousandShips/improve_err_prints_core
...
[Core] Improve error messages with `vformat`
2024-10-31 20:14:36 -05:00
A Thousand Ships
38f9769bc6
[Core] Improve error messages with vformat
2024-10-30 15:55:51 +01:00
Michael Alexsander
16524a8a01
Add "Game" editor for better runtime debugging
2024-10-30 11:42:17 -03:00
Clay John
f83a27353f
Merge pull request #98318 from alexkar598/mouse_emulation
...
Fix mouse emulation always sending events to the main window
2024-10-24 20:37:55 -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 -05:00