From 5a47379bf5f011a65c1d0f88a0cb5f2130feb9db Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 16 Jan 2021 16:44:59 +0300 Subject: Includes overhaul, fix some compiler warnings --- src/skel/glfw/glfw.cpp | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) (limited to 'src/skel/glfw') diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 93bfde5a..683407aa 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -1,22 +1,30 @@ #if defined RW_GL3 && !defined LIBRW_SDL2 #ifdef _WIN32 -#include +#include +#include #include +#include #include #include -#include -#include -#include + +DWORD _dwOperatingSystemVersion; +#include "resource.h" +#else +long _dwOperatingSystemVersion; +#ifndef __APPLE__ +#include +#else +#include +#include +#endif +#include +#include +#include +#include #endif -#define WITHWINDOWS #include "common.h" - -#pragma warning( push ) -#pragma warning( disable : 4005) -#pragma warning( pop ) - #if (defined(_MSC_VER)) #include #endif /* (defined(_MSC_VER)) */ @@ -73,23 +81,6 @@ static psGlobalType PsGlobal; size_t _dwMemAvailPhys; RwUInt32 gGameState; -#ifdef _WIN32 -DWORD _dwOperatingSystemVersion; -#include "resource.h" -#else -long _dwOperatingSystemVersion; -#ifndef __APPLE__ -#include -#else -#include -#include -#endif -#include -#include -#include -#include -#endif - #ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS char gSelectedJoystickName[128] = ""; #endif -- cgit v1.2.3 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 +++++ 1 file changed, 5 insertions(+) (limited to 'src/skel/glfw') 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 -- cgit v1.2.3