Skip to content

Commit

Permalink
allow saving of options with custom config dir (#2204)
Browse files Browse the repository at this point in the history
Co-authored-by: jstsmthrgk <[email protected]>
  • Loading branch information
jstsmthrgk and jstsmthrgk authored Oct 16, 2024
1 parent 9745140 commit ee2aafe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/menus/optionsMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ OptionsMenu::OptionsMenu()
// Save options button.
(new GuiButton(this, "SAVE_OPTIONS", tr("options", "Save"), []()
{
if (getenv("HOME"))
if (getenv("EE_CONF_DIR"))
PreferencesManager::save(string(getenv("EE_CONF_DIR")) + "/options.ini");
else if (getenv("HOME"))
PreferencesManager::save(string(getenv("HOME")) + "/.emptyepsilon/options.ini");
else
PreferencesManager::save("options.ini");
Expand Down

0 comments on commit ee2aafe

Please sign in to comment.