1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Process SDL joypad events on startup

Make sure that SDL events are processed when the SDL joypad input driver is initialized, this will allow it to register the connected controllers when a game starts.
This commit is contained in:
Nintorch
2025-08-18 23:55:20 +05:00
parent 42224bb750
commit 197961ddc9

View File

@@ -88,6 +88,9 @@ Error JoypadSDL::initialize() {
SDL_AddGamepadMappingsFromIO(rw, 1);
}
// Make sure that we handle already connected joypads when the driver is initialized.
process_events();
print_verbose("SDL: Init OK!");
return OK;
}