From 448e41ecaa66483c4cf764fdeb66a857a42719cf Mon Sep 17 00:00:00 2001 From: erorcun Date: Fri, 15 Jan 2021 04:40:34 +0300 Subject: Store all settings in .INI --- src/skel/glfw/glfw.cpp | 5 +++++ src/skel/win/win.cpp | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'src/skel') diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 683407aa..5f87d600 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -1598,6 +1598,7 @@ main(int argc, char *argv[]) SystemParametersInfo(SPI_SETSTICKYKEYS, sizeof(STICKYKEYS), &NewStickyKeys, SPIF_SENDCHANGE); #endif + // This part is needed because controller initialisation overwrites loaded settings. { CFileMgr::SetDirMyDocuments(); @@ -1610,6 +1611,10 @@ main(int argc, char *argv[]) } CFileMgr::SetDir(""); + +#ifdef LOAD_INI_SETTINGS + LoadINIControllerSettings(); +#endif } #ifdef _WIN32 diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index d373a8b5..5a0c7db2 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -2142,6 +2142,7 @@ WinMain(HINSTANCE instance, ShowWindow(PSGLOBAL(window), cmdShow); UpdateWindow(PSGLOBAL(window)); + // This part is needed because controller initialisation overwrites loaded settings. { CFileMgr::SetDirMyDocuments(); @@ -2154,6 +2155,10 @@ WinMain(HINSTANCE instance, } CFileMgr::SetDir(""); + +#ifdef LOAD_INI_SETTINGS + LoadINIControllerSettings(); +#endif } SetErrorMode(SEM_FAILCRITICALERRORS); -- cgit v1.2.3