Make close event trigger consistently

This commit is contained in:
Tamás Bálint Misius 2018-11-17 11:20:29 +01:00 committed by jacob1
parent b41f228c10
commit 5a57c37ae9
2 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,6 @@ void EventProcess(SDL_Event event)
switch (event.type) switch (event.type)
{ {
case SDL_QUIT: case SDL_QUIT:
engine->onClose();
if (engine->GetFastQuit() || engine->CloseWindow()) if (engine->GetFastQuit() || engine->CloseWindow())
engine->Exit(); engine->Exit();
break; break;

View File

@ -72,6 +72,7 @@ void Engine::UnBreak()
void Engine::Exit() void Engine::Exit()
{ {
onClose();
running_ = false; running_ = false;
} }