Skip to content

Commit 16389fa

Browse files
author
Lukasz Laniewski-Wollk
committed
Adding support for closing in multi-window situation
1 parent 57b3a41 commit 16389fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphics_sdl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ int window::sdl_global::animate(double fps) {
240240
while( SDL_PollEvent(&event) )
241241
{
242242
if (event.type == SDL_QUIT) {
243+
exit(0);
244+
ret = 0;
245+
}
246+
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE) {
243247
exit(0);
244248
ret = 0;
245249
}

0 commit comments

Comments
 (0)