mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-22 22:58:12 +03:00
show_quit_dialog: Default to quitting if SDL_ShowMessageBox fails
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user