From 21d2e5fb9413d8ea5110816f2de4b2e88769584a Mon Sep 17 00:00:00 2001 From: kichikuou Date: Thu, 30 Jul 2026 16:33:03 +0900 Subject: [PATCH] show_quit_dialog: Default to quitting if SDL_ShowMessageBox fails --- src/sys/nact_input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sys/nact_input.cpp b/src/sys/nact_input.cpp index 154e74a..b745b78 100644 --- a/src/sys/nact_input.cpp +++ b/src/sys/nact_input.cpp @@ -178,7 +178,7 @@ void NACT::show_quit_dialog() }; const SDL_MessageBoxData messagebox_data = { SDL_MESSAGEBOX_INFORMATION, - nullptr, + g_window, "System3", "Quit game?\nAny unsaved progress will be lost.", SDL_arraysize(buttons), @@ -187,7 +187,7 @@ void NACT::show_quit_dialog() int buttonid = 0; if (SDL_ShowMessageBox(&messagebox_data, &buttonid) < 0) { WARNING("error displaying message box"); - return; + buttonid = 1; } if (buttonid == 1) { quit(0);