You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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>
This commit is contained in:
committed by
Rémi Verschelde
parent
987832be46
commit
0b3496fb4f
@@ -587,9 +587,13 @@ void Input::joy_connection_changed(int p_idx, bool p_connected, const String &p_
|
||||
js.uid = uidname;
|
||||
js.connected = true;
|
||||
int mapping = fallback_mapping;
|
||||
for (int i = 0; i < map_db.size(); i++) {
|
||||
if (js.uid == map_db[i].uid) {
|
||||
mapping = i;
|
||||
// Bypass the mapping system if the joypad's mapping is already handled by its driver
|
||||
// (for example, the SDL joypad driver).
|
||||
if (!p_joypad_info.get("mapping_handled", false)) {
|
||||
for (int i = 0; i < map_db.size(); i++) {
|
||||
if (js.uid == map_db[i].uid) {
|
||||
mapping = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
_set_joypad_mapping(js, mapping);
|
||||
|
||||
Reference in New Issue
Block a user