Add an environment variable opt-out for the gamepad quit combo

See #870
This commit is contained in:
Cameron Gutman 2022-10-25 00:27:40 -05:00
parent 3da505c4c6
commit c8aeca8ace

View file

@ -259,7 +259,7 @@ void SdlInputHandler::handleControllerButtonEvent(SDL_ControllerButtonEvent* eve
} }
// Handle Start+Select+L1+R1 as a gamepad quit combo // Handle Start+Select+L1+R1 as a gamepad quit combo
if (state->buttons == (PLAY_FLAG | BACK_FLAG | LB_FLAG | RB_FLAG)) { if (state->buttons == (PLAY_FLAG | BACK_FLAG | LB_FLAG | RB_FLAG) && qgetenv("NO_GAMEPAD_QUIT") != "1") {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Detected quit gamepad button combo"); "Detected quit gamepad button combo");