MCPcopy Create free account
hub / github.com/Raais/ImStudio / UpdateSettings

Method UpdateSettings

src/third-party/imgui/imgui.cpp:11486–11511  ·  view source on GitHub ↗

Called by NewFrame()

Source from the content-addressed store, hash-verified

11484
11485// Called by NewFrame()
11486void ImGui::UpdateSettings()
11487{
11488 // Load settings on first frame (if not explicitly loaded manually before)
11489 ImGuiContext& g = *GImGui;
11490 if (!g.SettingsLoaded)
11491 {
11492 IM_ASSERT(g.SettingsWindows.empty());
11493 if (g.IO.IniFilename)
11494 LoadIniSettingsFromDisk(g.IO.IniFilename);
11495 g.SettingsLoaded = true;
11496 }
11497
11498 // Save settings (with a delay after the last modification, so we don't spam disk too much)
11499 if (g.SettingsDirtyTimer > 0.0f)
11500 {
11501 g.SettingsDirtyTimer -= g.IO.DeltaTime;
11502 if (g.SettingsDirtyTimer <= 0.0f)
11503 {
11504 if (g.IO.IniFilename != NULL)
11505 SaveIniSettingsToDisk(g.IO.IniFilename);
11506 else
11507 g.IO.WantSaveIniSettings = true; // Let user know they can call SaveIniSettingsToMemory(). user will need to clear io.WantSaveIniSettings themselves.
11508 g.SettingsDirtyTimer = 0.0f;
11509 }
11510 }
11511}
11512
11513void ImGui::MarkIniSettingsDirty()
11514{

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected