Merge pull request #106218 from Nintorch/master

Add support for SDL3 joystick input driver for Windows, Linux and macOS
This commit is contained in:
Thaddeus Crews
2025-06-24 18:34:28 -05:00
330 changed files with 154930 additions and 1561 deletions

View File

@ -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);