summaryrefslogtreecommitdiff
path: root/src/PowderToySDL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/PowderToySDL.cpp')
-rw-r--r--src/PowderToySDL.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp
index 8236730..74d8bc5 100644
--- a/src/PowderToySDL.cpp
+++ b/src/PowderToySDL.cpp
@@ -309,7 +309,8 @@ void EngineProcess()
switch (event.type)
{
case SDL_QUIT:
- engine->Exit();
+ if (engine->GetFastQuit() || engine->CloseWindow())
+ engine->Exit();
break;
case SDL_KEYDOWN:
engine->onKeyPress(event.key.keysym.sym, event.key.keysym.unicode, event.key.keysym.mod&KEY_MOD_LSHIFT, event.key.keysym.mod&KEY_MOD_LCONTROL, event.key.keysym.mod&KEY_MOD_LALT);
@@ -491,6 +492,7 @@ int main(int argc, char * argv[])
engine = &ui::Engine::Ref();
engine->SetMaxSize(desktopWidth, desktopHeight);
engine->Begin(XRES+BARSIZE, YRES+MENUSIZE);
+ engine->SetFastQuit(Client::Ref().GetPrefBool("FastQuit", true));
GameController * gameController = new GameController();
engine->ShowWindow(gameController->GetView());