fix: window teardown
This commit is contained in:
@@ -29,13 +29,16 @@ int App::run() {
|
||||
// poll events here
|
||||
// other threads might be able to change quit to true to auto close
|
||||
|
||||
while( SDL_PollEvent( &e ) != 0 ) {
|
||||
if( e.type == SDL_QUIT ) {
|
||||
// Ctrl + C in console !
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event)) { // TODO: pass event handling to window
|
||||
if(event.type == SDL_EVENT_QUIT ) {
|
||||
quit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SDL teardown handled in window destructor
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user