diff --git a/client/src/main.c b/client/src/main.c index 4af4b85c..dc7653f1 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -795,6 +795,8 @@ static int lg_run(void) g_state.io = igGetIO(); g_state.style = igGetStyle(); + alloc_sprintf(&g_state.imGuiIni, "%s/imgui.ini", lgConfigDir()); + g_state.io->IniFilename = g_state.imGuiIni; g_state.io->BackendFlags |= ImGuiBackendFlags_HasMouseCursors; g_state.windowScale = 1.0; @@ -1156,6 +1158,8 @@ static void lg_shutdown(void) g_state.overlays = NULL; } + free(g_state.imGuiIni); + if (g_state.frameEvent) { lgFreeEvent(g_state.frameEvent); diff --git a/client/src/main.h b/client/src/main.h index 40c4f25b..8d5a4966 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -57,6 +57,7 @@ struct AppState ImGuiMouseCursor cursorLast; LGEvent * overlayRenderEvent; bool overlayMustWait; + char * imGuiIni; bool alertShow; char * alertMessage;