paths: ensure imgui and game_config respects the project path (#1505)

* paths: ensure `imgui` respects the project path

* paths: remove extra creation of `game_config/` this is done when the settings are saved
This commit is contained in:
Tyler Wilding
2022-06-21 18:22:31 -04:00
committed by GitHub
parent 65f47f2bfc
commit 818485b501
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -297,7 +297,8 @@ void MercModelGroup::serialize(Serializer& ser) {
void Level::serialize(Serializer& ser) {
ser.from_ptr(&version);
if (ser.is_loading() && version != TFRAG3_VERSION) {
ASSERT_MSG(false, fmt::format("version mismatch when loading tfrag3 data. Got {}, expected {}",
ASSERT_MSG(false, fmt::format("version mismatch when loading tfrag3 data. Got {}, expected {}, "
"did you forget to re-decompile?",
version, TFRAG3_VERSION));
}
+5
View File
@@ -234,6 +234,11 @@ static std::shared_ptr<GfxDisplay> gl_make_display(int width,
// this does initialization for stuff like the font data
ImGui::CreateContext();
// Init ImGui settings
ImGuiIO& io = ImGui::GetIO();
io.IniFilename = file_util::get_file_path({"imgui.ini"}).c_str();
io.LogFilename = file_util::get_file_path({"imgui_log.txt"}).c_str();
// set up to get inputs for this window
ImGui_ImplGlfw_InitForOpenGL(window, true);
-2
View File
@@ -282,8 +282,6 @@ RuntimeExitStatus exec_runtime(int argc, char** argv) {
g_argv = argv;
g_main_thread_id = std::this_thread::get_id();
file_util::create_dir_if_needed("game_config/");
// parse opengoal arguments
bool enable_display = true;
for (int i = 1; i < argc; i++) {