1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
Commit Graph

417 Commits

Author SHA1 Message Date
Thaddeus Crews
52a5644b5f Merge pull request #108214 from Nintorch/fix-joypad-vendor-product
Fix `Input.get_joy_info()` regression after the SDL input driver PR
2025-09-01 11:14:12 -05:00
Nintorch
f28acf97d0 Fix Input.get_joy_info() regression
SDL input driver did not have the "xinput_index", "raw_name", "vendor_id" and "product_id" fields for this method and exposed an additional, essentially useless for the users "mapping_handled" field. This commit fixes these issues.
2025-08-29 22:13:40 +05:00
Talkashie
bc7e68dfd1 Typos 2025-08-19 18:32:59 -05:00
Pāvels Nadtočajevs
10fd7163d4 Add methods to check which event first triggered "just pressed/released" state. 2025-08-12 16:25:23 +03:00
风青山
95403207e8 Use EditorUndoRedoManager to track the property changes of the
configured `InputEvent` in the plugin

This allows undo and redo, and can mark in time whether the handled
`InputEvent` resource is edited.

`command_or_control_autoremap` needs to be handled separately, as
its value will change the usage of other properties.
2025-07-27 13:57:16 +08:00
风青山
efed435fa3 Fix screen_accum not being reset when it should be in Input::VelocityTrack
Resets `screen_accum` like `accum`.
2025-06-26 20:06:03 +08:00
Geoffroy Warin
88c086d082 Sync controller mappings DB with SDL community repo
Synced with: mdqinc/SDL_GameControllerDB@1849728
2025-06-25 12:42:43 +02:00
Nintorch
0b3496fb4f Add support for SDL3 joystick input driver
Made possible by EIREXE, xsellier and the SDL team.

This commit includes statically linked SDL3 for Windows, Linux and macOS.
The vendored copy of SDL3 was setup to only build the required subsystems
for gamepad/joystick support, with some patches to be able to make it as
minimal as possible and reduce the impact on binary size and code size.

Co-authored-by: Álex Román Núñez <eirexe123@gmail.com>
Co-authored-by: Xavier Sellier <xsellier@gmail.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-06-25 01:28:50 +02:00
Hugo Locurcio
b4477f3f49 Fix action name for ui_colorpicker_delete_preset in built-in InputMap
The old action name is a leftover from a now-reverted PR.
2025-06-13 02:24:34 +02:00
Haoyu Qiu
fa7efd94b3 Fix mixed use of spaces and tabs for indentation 2025-06-07 00:30:26 +08:00
kobewi
c32a031908 Improve auto-translation of Script Editor 2025-06-04 14:41:15 +02:00
Ricardo Sanchez-Saez
457299449d Introduce 'drivers/apple_embedded' abstract platform for code reuse 2025-05-19 15:37:13 -07:00
Thaddeus Crews
5620a215a1 Merge pull request #106021 from Alex2782/fix_xbox_controller_on_android
Fix Xbox Controller on Android
2025-05-16 07:43:09 -05:00
Thaddeus Crews
1c4b660312 Merge pull request #96611 from Dynamic-Pistol/master
Add `PROPERTY_HINT_INPUT_NAME` for use with `@export_custom` to allow using input actions
2025-05-13 16:22:25 -05:00
Yufeng Ying
55a61cbd4a Optimize InputMap::get_actions. 2025-05-12 17:51:27 +08:00
Stuart Carnie
00e1fdec2c MacOS: Embedded window support. 2025-05-06 06:09:05 +10:00
Alexander Hartmann
cf00265386 Fix Xbox Controller on Android 2025-05-03 01:09:05 +02: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
Dynamic-Pistol
c8fed1e1d0 Add PROPERTY_HINT_INPUT_NAME
Added PROPERTY_HINT_INPUT_NAME for StringName based off https://github.com/godotengine/godot-proposals/discussions/7559
2025-04-23 22:23:44 +02: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