mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-26 03:35:27 +00:00
Win32: Add a command-line option to let the escape button exit the emulator.
This commit is contained in:
parent
de1c756258
commit
7efaadaf3c
@ -69,6 +69,7 @@ public:
|
||||
bool bTopMost;
|
||||
std::string sFont;
|
||||
bool bIgnoreWindowsKey;
|
||||
bool bEscapeExitsEmulator;
|
||||
#endif
|
||||
// Core
|
||||
bool bIgnoreBadMemAccess;
|
||||
|
@ -118,6 +118,11 @@ namespace WindowsRawInput {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_Config.bEscapeExitsEmulator && raw->data.keyboard.VKey == VK_ESCAPE) {
|
||||
DestroyWindow(MainWindow::GetHWND());
|
||||
return;
|
||||
}
|
||||
|
||||
KeyInput key;
|
||||
key.deviceId = DEVICE_ID_KEYBOARD;
|
||||
|
||||
|
@ -297,6 +297,9 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
if (!strncmp(__argv[i], "--windowed", strlen("--windowed")))
|
||||
g_Config.bFullScreen = false;
|
||||
|
||||
if (!strncmp(__argv[i], "--escapeexitsemu", strlen("--escapeexitsemu")))
|
||||
g_Config.bEscapeExitsEmulator = true;
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user