Skip to content

Conversation

brianabdl
Copy link
Contributor

The output of imgui.ini will be placed in app-specific Internal storage directories

Internal storage directories is used because it can safetly save any files in this directory and doesn't require any permission storage.

@ocornut ocornut added the settings .ini persistance label Oct 30, 2022
ocornut pushed a commit that referenced this pull request Oct 31, 2022
…sToMemory() to save in appropriate location for Android. (#5836)
@ocornut
Copy link
Owner

ocornut commented Oct 31, 2022

Thank you for the PR!

Reworded and merged as c2694ef

I simply changed it to:

    // Redirect loading/saving of .ini file to our location.
    // Make sure 'g_IniFilename' persists while we use Dear ImGui.
    g_IniFilename = std::string(app->activity->internalDataPath) + "/imgui.ini";
    io.IniFilename = g_IniFilename.c_str();;

So there's no need to use LoadIniSettingsFromDisk(), SaveIniSettingsToDisk(), io.WantSaveIniSettings` directly.

@ocornut ocornut closed this Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
settings .ini persistance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants