diff --git a/src/platforms/rcore_desktop_sdl.c b/src/platforms/rcore_desktop_sdl.c index 21160b19e..6e62838e3 100644 --- a/src/platforms/rcore_desktop_sdl.c +++ b/src/platforms/rcore_desktop_sdl.c @@ -1670,7 +1670,7 @@ void PollInputEvents(void) { int jid = event.jdevice.which; // Joystick device index - if (!CORE.Input.Gamepad.ready[jid] && (jid < MAX_GAMEPADS)) + if (CORE.Input.Gamepad.ready[jid] && (jid < MAX_GAMEPADS)) { platform.gamepad[jid] = SDL_GameControllerOpen(jid); platform.gamepadId[jid] = SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(platform.gamepad[jid]));