[client] imgui: put imgui.ini in $XDG_CONFIG_DIR/looking-glass

This commit is contained in:
Quantum 2021-07-31 07:14:23 -04:00 committed by Geoffrey McRae
parent 6109067275
commit 7c3c68b84b
2 changed files with 5 additions and 0 deletions

View file

@ -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);

View file

@ -57,6 +57,7 @@ struct AppState
ImGuiMouseCursor cursorLast;
LGEvent * overlayRenderEvent;
bool overlayMustWait;
char * imGuiIni;
bool alertShow;
char * alertMessage;