diff --git a/r5dev/thirdparty/imgui/include/imgui_utility.h b/r5dev/thirdparty/imgui/include/imgui_utility.h index 421ffc33..a09a2875 100644 --- a/r5dev/thirdparty/imgui/include/imgui_utility.h +++ b/r5dev/thirdparty/imgui/include/imgui_utility.h @@ -1,6 +1,5 @@ #pragma once -constexpr char IMGUI_BIND_PATH[] = "cfg/imgui/"; constexpr char IMGUI_BIND_FILE[] = "bind.json"; enum class ImGuiStyle_t diff --git a/r5dev/thirdparty/imgui/src/imgui.cpp b/r5dev/thirdparty/imgui/src/imgui.cpp index 467321ee..525de5d1 100644 --- a/r5dev/thirdparty/imgui/src/imgui.cpp +++ b/r5dev/thirdparty/imgui/src/imgui.cpp @@ -1172,7 +1172,7 @@ ImGuiIO::ImGuiIO() DisplaySize = ImVec2(-1.0f, -1.0f); DeltaTime = 1.0f / 60.0f; IniSavingRate = 5.0f; - IniFilename = "platform\\cfg\\imgui\\layout.ini"; // Important: "imgui_layout.ini" is relative to current working dir, most apps will want to lock this to an absolute path (e.g. same path as executables). + IniFilename = "platform\\cfg\\system\\layout.ini"; // Important: "imgui_layout.ini" is relative to current working dir, most apps will want to lock this to an absolute path (e.g. same path as executables). LogFilename = "platform\\logs\\imgui_log.txt"; MouseDoubleClickTime = 0.30f; MouseDoubleClickMaxDist = 6.0f; diff --git a/r5dev/thirdparty/imgui/src/imgui_utility.cpp b/r5dev/thirdparty/imgui/src/imgui_utility.cpp index 8d2619aa..2bd66c4f 100644 --- a/r5dev/thirdparty/imgui/src/imgui_utility.cpp +++ b/r5dev/thirdparty/imgui/src/imgui_utility.cpp @@ -10,10 +10,10 @@ void ImGuiConfig::Load() { - const string svPath = fmt::format("{:s}{:s}", IMGUI_BIND_PATH, IMGUI_BIND_FILE); + const string svPath = Format(SDK_SYSTEM_CFG_PATH"%s", IMGUI_BIND_FILE); DevMsg(eDLL_T::MS, "Loading ImGui config file '%s'\n", svPath.c_str()); - FileSystem()->CreateDirHierarchy(IMGUI_BIND_PATH, "PLATFORM"); // Create directory, so ImGui can load/save 'layout.ini'. + FileSystem()->CreateDirHierarchy(SDK_SYSTEM_CFG_PATH, "PLATFORM"); // Create directory, so ImGui can load/save 'layout.ini'. FileHandle_t hFile = FileSystem()->Open(svPath.c_str(), "rt", "PLATFORM"); if (!hFile) @@ -54,10 +54,10 @@ void ImGuiConfig::Load() void ImGuiConfig::Save() { - const string svPath = fmt::format("{:s}{:s}", IMGUI_BIND_PATH, IMGUI_BIND_FILE); + const string svPath = Format(SDK_SYSTEM_CFG_PATH"%s", IMGUI_BIND_FILE); DevMsg(eDLL_T::MS, "Saving ImGui config file '%s'\n", svPath.c_str()); - FileSystem()->CreateDirHierarchy(IMGUI_BIND_PATH, "PLATFORM"); + FileSystem()->CreateDirHierarchy(SDK_SYSTEM_CFG_PATH, "PLATFORM"); FileHandle_t hFile = FileSystem()->Open(svPath.c_str(), "wt", "PLATFORM"); if (!hFile) diff --git a/r5dev/tier0/basetypes.h b/r5dev/tier0/basetypes.h index 54d8c2df..9c5e9f88 100644 --- a/r5dev/tier0/basetypes.h +++ b/r5dev/tier0/basetypes.h @@ -149,10 +149,11 @@ #define SDK_ARRAYSIZE(arr) ((sizeof(arr) / sizeof(*arr))) // Name due to IMGUI implementation and NT implementation that we shouldn't share across everywhere. #ifndef DEDICATED -#define SDK_DEFAULT_CFG "platform\\cfg\\startup_default.cfg" +#define SDK_DEFAULT_CFG "platform/cfg/startup_default.cfg" #else -#define SDK_DEFAULT_CFG "platform\\cfg\\startup_dedi_default.cfg" +#define SDK_DEFAULT_CFG "platform/cfg/startup_dedi_default.cfg" #endif +#define SDK_SYSTEM_CFG_PATH "cfg/system/" // #define COMPILETIME_MAX and COMPILETIME_MIN for max/min in constant expressions #define COMPILETIME_MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )