diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 6d19a66171..03408e426e 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -862,6 +862,28 @@ static void ProcessSDLEvent(SDL_Window *window, const SDL_Event &event, InputSta g_rebootEmuThread = true; } #endif + // Convenience subset of what + // "Enable standard shortcut keys" + // does on Windows. + if(g_Config.bSystemControls) { + bool ctrl = bool(event.key.keysym.mod & KMOD_CTRL); + if (ctrl && (k == SDLK_w)) + { + if (Core_IsStepping()) + Core_EnableStepping(false); + Core_Stop(); + System_PostUIMessage("stop", ""); + // NOTE: Unlike Windows version, this + // does not need Core_WaitInactive(); + // since SDL does not have a separate + // UI thread. + } + if (ctrl && (k == SDLK_b)) + { + System_PostUIMessage("reset", ""); + Core_EnableStepping(false); + } + } break; } case SDL_KEYUP: diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 7a6b3a3a93..1fe8f2b1bf 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -642,8 +642,10 @@ void GameSettingsScreen::CreateControlsSettings(UI::ViewGroup *controlsSettings) controlsSettings->Add(new Choice(co->T("Control Mapping")))->OnClick.Handle(this, &GameSettingsScreen::OnControlMapping); controlsSettings->Add(new Choice(co->T("Calibrate Analog Stick")))->OnClick.Handle(this, &GameSettingsScreen::OnCalibrateAnalogs); -#if defined(USING_WIN_UI) +#if defined(USING_WIN_UI) || (PPSSPP_PLATFORM(LINUX) && !PPSSPP_PLATFORM(ANDROID)) controlsSettings->Add(new CheckBox(&g_Config.bSystemControls, co->T("Enable standard shortcut keys"))); +#endif +#if defined(USING_WIN_UI) controlsSettings->Add(new CheckBox(&g_Config.bGamepadOnlyFocused, co->T("Ignore gamepads when not focused"))); #endif