diff --git a/CHANGELOG.md b/CHANGELOG.md index 8648e8bd56..1dc25220a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). guidelines. - Negative scale factors are now supported by the 3D renderer, which can be handy for mirroring meshes (thanks @carlosedubarreto, #974) +- `imgui_base_config.ini` is now optional, and should now be located at + `resources/OpenSimCreator`, rather than in the root `resources/` directory. ## [0.5.18] - 2025/01/16 diff --git a/liboscar/UI/oscimgui.cpp b/liboscar/UI/oscimgui.cpp index 2bb1a8393f..cd60e405b1 100644 --- a/liboscar/UI/oscimgui.cpp +++ b/liboscar/UI/oscimgui.cpp @@ -707,8 +707,12 @@ namespace // load application-level ImGui settings, then the user one, // so that the user settings takes precedence { - const std::string base_ini_data = loader.slurp("imgui_base_config.ini"); - ImGui::LoadIniSettingsFromMemory(base_ini_data.data(), base_ini_data.size()); + // TODO: this should be provided externally by osc/libOpenSimCreator, so that + // OpenSim-independent codebases aren't dependent on it + if (loader.resource_exists("OpenSimCreator/imgui_base_config.ini")) { + const std::string base_ini_data = loader.slurp("OpenSimCreator/imgui_base_config.ini"); + ImGui::LoadIniSettingsFromMemory(base_ini_data.data(), base_ini_data.size()); + } // CARE: the reason this filepath is `static` is because ImGui requires that // the string outlives the ImGui context diff --git a/resources/imgui_base_config.ini b/resources/OpenSimCreator/imgui_base_config.ini similarity index 100% rename from resources/imgui_base_config.ini rename to resources/OpenSimCreator/imgui_base_config.ini