mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-03 04:52:14 +01:00
SDL: Quit when the main window is closed, with --game-window open too
SDL sends a quit only when the last window closes, so with the game window open, closing the main one did nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
013460b2fe
commit
ea26b3c7dd
1 file changed
+7
@@ -1524,6 +1524,13 @@ static void ProcessSDLEvent(SDL_Window *window, const SDL_Event &event, InputSta
|
||||
g_QuitRequested = 1;
|
||||
break;
|
||||
|
||||
case SDL_EVENT_WINDOW_CLOSE_REQUESTED:
|
||||
// SDL only sends a quit when the last window closes, and --game-window's may still be open.
|
||||
if (SDL_GetWindowFromEvent(&event) == window) {
|
||||
g_QuitRequested = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
case SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED:
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user