mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
add configuration menu "other settings" and add "save metadata on exit" option, which users can use to speed up exit - fixes #35
This commit is contained in:
parent
e65a1ee80a
commit
26f4850eaf
|
@ -55,7 +55,7 @@ SystemData::SystemData(const std::string& name, const std::string& fullName, con
|
|||
SystemData::~SystemData()
|
||||
{
|
||||
//save changed game data back to xml
|
||||
if(!Settings::getInstance()->getBool("IgnoreGamelist"))
|
||||
if(!Settings::getInstance()->getBool("IgnoreGamelist") && Settings::getInstance()->getBool("SaveGamelistsOnExit"))
|
||||
{
|
||||
updateGamelist(this);
|
||||
}
|
||||
|
|
|
@ -165,6 +165,19 @@ GuiMenu::GuiMenu(Window* window) : GuiComponent(window), mMenu(window, "MAIN MEN
|
|||
mWindow->pushGui(s);
|
||||
});
|
||||
|
||||
addEntry("OTHER SETTINGS", 0x777777FF, true,
|
||||
[this] {
|
||||
auto s = new GuiSettings(mWindow, "OTHER SETTINGS");
|
||||
|
||||
// gamelists
|
||||
auto save_gamelists = std::make_shared<SwitchComponent>(mWindow);
|
||||
save_gamelists->setState(Settings::getInstance()->getBool("SaveGamelistsOnExit"));
|
||||
s->addWithLabel("SAVE METADATA ON EXIT", save_gamelists);
|
||||
s->addSaveFunc([save_gamelists] { Settings::getInstance()->setBool("SaveGamelistsOnExit", save_gamelists->getState()); });
|
||||
|
||||
mWindow->pushGui(s);
|
||||
});
|
||||
|
||||
addEntry("CONFIGURE INPUT", 0x777777FF, true,
|
||||
[this] {
|
||||
mWindow->pushGui(new GuiDetectDevice(mWindow, false, nullptr));
|
||||
|
|
|
@ -59,6 +59,7 @@ void Settings::setDefaults()
|
|||
mBoolMap["IgnoreGamelist"] = false;
|
||||
mBoolMap["HideConsole"] = true;
|
||||
mBoolMap["QuickSystemSelect"] = true;
|
||||
mBoolMap["SaveGamelistsOnExit"] = true;
|
||||
|
||||
mBoolMap["Debug"] = false;
|
||||
mBoolMap["DebugGrid"] = false;
|
||||
|
|
Loading…
Reference in a new issue