Handle window closing event to stop SoH (#1556)
* Handle window closing event to stop app * Address PR comments
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user