Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)

features/potocpav-newer-lines-2
omar ago%!(EXTRA string=7 years)
parent 296f03374b
commit 84fe711bdf
  1. 4
      CHANGELOG.txt
  2. 2
      imgui.cpp

@ -41,11 +41,13 @@ VERSION 1.61 WIP
Breaking Changes: Breaking Changes:
(IN PROGRESS, WILL ADD TO THIS LIST AS WE WORK ON 1.61) (IN PROGRESS, WILL ADD TO THIS LIST AS WE WORK ON 1.61)
- Misc: IM_DELETE() helper function added in 1.60 doesn't clear the input _pointer_ reference, more consistent with expectation and allows passing r-value. - Misc: IM_DELETE() helper function added in 1.60 doesn't clear the input _pointer_ reference, more consistent with expectation and allows passing r-value.
Other Changes: Other Changes:
(IN PROGRESS, WILL ADD TO THIS LIST AS WE WORK ON 1.61) (IN PROGRESS, WILL ADD TO THIS LIST AS WE WORK ON 1.61)
- ...
- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
----------------------------------------------------------------------- -----------------------------------------------------------------------

@ -3676,6 +3676,8 @@ void ImGui::Shutdown(ImGuiContext* context)
if (!g.Initialized) if (!g.Initialized)
return; return;
// Save settings (unless we haven't attempted to load them: CreateContext/DestroyContext without a call to NewFrame shouldn't save an empty file)
if (g.SettingsLoaded)
SaveIniSettingsToDisk(g.IO.IniFilename); SaveIniSettingsToDisk(g.IO.IniFilename);
// Clear everything else // Clear everything else

Loading…
Cancel
Save