don't check gamepad when game is running to avoid conflicts

This commit is contained in:
rainmakerv3 2025-06-25 14:43:08 +08:00
parent 8b08e2b382
commit 7d14392874

View File

@ -21,6 +21,7 @@ ControlSettings::ControlSettings(std::shared_ptr<GameInfoClass> game_info_get, b
if (!GameRunning) {
SDL_InitSubSystem(SDL_INIT_GAMEPAD);
SDL_InitSubSystem(SDL_INIT_EVENTS);
CheckGamePad();
} else {
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
SDL_Event pauseGame{};
@ -28,7 +29,6 @@ ControlSettings::ControlSettings(std::shared_ptr<GameInfoClass> game_info_get, b
SDL_PushEvent(&pauseGame);
}
CheckGamePad();
AddBoxItems();
SetUIValuestoMappings();
UpdateLightbarColor();