uwp: the back button (B) shouldn't close the app

This commit is contained in:
flyinghead 2021-11-24 13:42:25 +01:00
parent e4bfeb9e44
commit 42fa77c81f
1 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,8 @@ void input_sdl_init()
NOTICE_LOG(INPUT, "Disabling XInput, using DirectInput");
SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "0");
}
// Don't close the app when pressing the B button
SDL_SetHint(SDL_HINT_WINRT_HANDLE_BACK_BUTTON, "1");
#endif
std::string db = get_readonly_data_path("gamecontrollerdb.txt");
int rv = SDL_GameControllerAddMappingsFromFile(db.c_str());