Skip to content

Commit c8b89b8

Browse files
committed
Merge pull request #109750 from Nintorch/fix-get-connected-joypads
Handle SDL joypad events for connected controllers on game startup (on Windows and Linux)
2 parents b2deb22 + 197961d commit c8b89b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/sdl/joypad_sdl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ Error JoypadSDL::initialize() {
8888
SDL_AddGamepadMappingsFromIO(rw, 1);
8989
}
9090

91+
// Make sure that we handle already connected joypads when the driver is initialized.
92+
process_events();
93+
9194
print_verbose("SDL: Init OK!");
9295
return OK;
9396
}

0 commit comments

Comments
 (0)