Merge pull request #18056 from fp64/sdl-ctrl-w
Implement Ctrl-W and Ctrl-B on SDL
This commit is contained in:
commit
42741430bc
2 changed files with 25 additions and 1 deletions
|
@ -863,6 +863,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue