mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
Handle window closing event to stop SoH (#1556)
* Handle window closing event to stop app * Address PR comments
This commit is contained in:
parent
fde05e65c0
commit
3a2fcc9604
@ -304,6 +304,10 @@ static void gfx_sdl_handle_events(void) {
|
||||
#else
|
||||
SDL_GL_GetDrawableSize(wnd, &window_width, &window_height);
|
||||
#endif
|
||||
} else if (event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(wnd)) {
|
||||
// We listen specifically for main window close because closing main window
|
||||
// on macOS does not trigger SDL_Quit.
|
||||
is_running = false;
|
||||
}
|
||||
break;
|
||||
case SDL_DROPFILE:
|
||||
|
Loading…
Reference in New Issue
Block a user