MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / SaveIniSettingsToDisk

Method SaveIniSettingsToDisk

imgui_tiny_app/imgui/imgui.cpp:16317–16331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16315}
16316
16317void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
16318{
16319 ImGuiContext& g = *GImGui;
16320 g.SettingsDirtyTimer = 0.0f;
16321 if (!ini_filename)
16322 return;
16323
16324 size_t ini_data_size = 0;
16325 const char* ini_data = SaveIniSettingsToMemory(&ini_data_size);
16326 ImFileHandle f = ImFileOpen(ini_filename, "wt");
16327 if (!f)
16328 return;
16329 ImFileWrite(ini_data, sizeof(char), ini_data_size, f);
16330 ImFileClose(f);
16331}
16332
16333// Call registered handlers (e.g. SettingsHandlerWindow_WriteAll() + custom handlers) to write their stuff into a text buffer
16334const char* ImGui::SaveIniSettingsToMemory(size_t* out_size)

Callers

nothing calls this directly

Calls 3

ImFileOpenFunction · 0.70
ImFileWriteFunction · 0.70
ImFileCloseFunction · 0.70

Tested by

no test coverage detected