MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / SaveIniSettingsToDisk

Method SaveIniSettingsToDisk

ImGUI GLFW Tutorial/imgui/imgui.cpp:10507–10521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10505}
10506
10507void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
10508{
10509 ImGuiContext& g = *GImGui;
10510 g.SettingsDirtyTimer = 0.0f;
10511 if (!ini_filename)
10512 return;
10513
10514 size_t ini_data_size = 0;
10515 const char* ini_data = SaveIniSettingsToMemory(&ini_data_size);
10516 ImFileHandle f = ImFileOpen(ini_filename, "wt");
10517 if (!f)
10518 return;
10519 ImFileWrite(ini_data, sizeof(char), ini_data_size, f);
10520 ImFileClose(f);
10521}
10522
10523// Call registered handlers (e.g. SettingsHandlerWindow_WriteAll() + custom handlers) to write their stuff into a text buffer
10524const 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