mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 21:02:18 -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
|
#else
|
||||||
SDL_GL_GetDrawableSize(wnd, &window_width, &window_height);
|
SDL_GL_GetDrawableSize(wnd, &window_width, &window_height);
|
||||||
#endif
|
#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;
|
break;
|
||||||
case SDL_DROPFILE:
|
case SDL_DROPFILE:
|
||||||
|
Loading…
Reference in New Issue
Block a user