1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Merge pull request #111503 from JestemStefan/fix_111176

Fix `Input.is_joy_known` response for SDL joypads
This commit is contained in:
Thaddeus Crews
2025-11-12 17:26:22 -06:00
3 changed files with 11 additions and 9 deletions

View File

@@ -186,7 +186,8 @@ void JoypadSDL::process_events() {
sdl_instance_id_to_joypad_id.insert(sdl_event.jdevice.which, joy_id);
Dictionary joypad_info;
joypad_info["mapping_handled"] = true; // Skip Godot's mapping system because SDL already handles the joypad's mapping.
// Skip Godot's mapping system if SDL already handles the joypad's mapping.
joypad_info["mapping_handled"] = SDL_IsGamepad(sdl_event.jdevice.which);
joypad_info["raw_name"] = String(SDL_GetJoystickName(joy));
joypad_info["vendor_id"] = itos(SDL_GetJoystickVendor(joy));
joypad_info["product_id"] = itos(SDL_GetJoystickProduct(joy));