MCPcopy Create free account
hub / github.com/RenderKit/embree / SaveIniSettingsToDisk

Method SaveIniSettingsToDisk

tutorials/common/imgui/imgui.cpp:12503–12517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12501}
12502
12503void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
12504{
12505 ImGuiContext& g = *GImGui;
12506 g.SettingsDirtyTimer = 0.0f;
12507 if (!ini_filename)
12508 return;
12509
12510 size_t ini_data_size = 0;
12511 const char* ini_data = SaveIniSettingsToMemory(&ini_data_size);
12512 ImFileHandle f = ImFileOpen(ini_filename, "wt");
12513 if (!f)
12514 return;
12515 ImFileWrite(ini_data, sizeof(char), ini_data_size, f);
12516 ImFileClose(f);
12517}
12518
12519// Call registered handlers (e.g. SettingsHandlerWindow_WriteAll() + custom handlers) to write their stuff into a text buffer
12520const 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