From 86c60e7bbedb60f2764be76e323c384cfc097120 Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:05:37 +0000 Subject: [PATCH] app: move config saving to App::Exit --- UnleashedRecomp/app.cpp | 3 +++ UnleashedRecomp/ui/window.cpp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/app.cpp b/UnleashedRecomp/app.cpp index b2f83b8..94cc419 100644 --- a/UnleashedRecomp/app.cpp +++ b/UnleashedRecomp/app.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include void App::Restart(std::vector restartArgs) @@ -13,6 +14,8 @@ void App::Restart(std::vector restartArgs) void App::Exit() { + Config::Save(); + #if _WIN32 ExitProcess(0); #endif diff --git a/UnleashedRecomp/ui/window.cpp b/UnleashedRecomp/ui/window.cpp index 6612160..86546de 100644 --- a/UnleashedRecomp/ui/window.cpp +++ b/UnleashedRecomp/ui/window.cpp @@ -18,7 +18,6 @@ int Window_OnSDLEvent(void*, SDL_Event* event) switch (event->type) { case SDL_QUIT: - Config::Save(); App::Exit(); break;