Skip to content

Commit 1fc5a58

Browse files
committed
GameInput: don't say the device is present if we won't handle it
(cherry picked from commit 71d0d06)
1 parent 9d80873 commit 1fc5a58

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/joystick/gdk/SDL_gameinputjoystick.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,9 @@ static bool GAMEINPUT_JoystickIsDevicePresent(Uint16 vendor_id, Uint16 product_i
492492
if (vendor_id == USB_VENDOR_MICROSOFT &&
493493
product_id == USB_PRODUCT_XBOX_ONE_XBOXGIP_CONTROLLER) {
494494
// The Xbox One controller shows up as a hardcoded raw input VID/PID, which we definitely handle
495-
return true;
495+
if (SDL_GetHintBoolean(SDL_HINT_JOYSTICK_GAMEINPUT, SDL_GAMEINPUT_DEFAULT)) {
496+
return true;
497+
}
496498
}
497499

498500
for (int i = 0; i < g_GameInputList.count; ++i) {

0 commit comments

Comments
 (0)