mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-15 04:06:24 +00:00
Add quit-app-and-exit shortcut Ctrl+Alt+Shift+E
Add a shortcut to quit the current app and exit Moonlight entirely.
This commit is contained in:
committed by
Cameron Gutman
parent
29b1304337
commit
9c9bfd8428
@@ -139,6 +139,20 @@ void SdlInputHandler::performSpecialKeyCombo(KeyCombo combo)
|
||||
updatePointerRegionLock();
|
||||
break;
|
||||
|
||||
case KeyComboQuitAndExit:
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Detected quitAndExit key combo");
|
||||
|
||||
// Indicate that we want to exit afterwards
|
||||
Session::get()->setShouldExitAfterQuit();
|
||||
|
||||
// Push a quit event to the main loop
|
||||
SDL_Event quitExitEvent;
|
||||
quitExitEvent.type = SDL_QUIT;
|
||||
quitExitEvent.quit.timestamp = SDL_GetTicks();
|
||||
SDL_PushEvent(&quitExitEvent);
|
||||
break;
|
||||
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user