mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +00:00
Changed the 'no games' dialog to no longer save the ROM directory to es_settings.xml if its value hasn't changed
This commit is contained in:
parent
42e3be2e2d
commit
99a0766dd9
|
@ -188,22 +188,24 @@ void ViewController::noGamesDialog()
|
|||
if (Settings::getInstance()->getBool("VirtualKeyboard")) {
|
||||
mWindow->pushGui(new GuiTextEditKeyboardPopup(
|
||||
HelpStyle(), 0.0f, "ENTER ROM DIRECTORY PATH", currentROMDirectory,
|
||||
[this](const std::string& newROMDirectory) {
|
||||
Settings::getInstance()->setString("ROMDirectory",
|
||||
Utils::String::trim(newROMDirectory));
|
||||
Settings::getInstance()->saveFile();
|
||||
[this, currentROMDirectory](const std::string& newROMDirectory) {
|
||||
if (currentROMDirectory != newROMDirectory) {
|
||||
Settings::getInstance()->setString(
|
||||
"ROMDirectory", Utils::String::trim(newROMDirectory));
|
||||
Settings::getInstance()->saveFile();
|
||||
#if defined(_WIN64)
|
||||
mRomDirectory =
|
||||
Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
|
||||
mRomDirectory =
|
||||
Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
|
||||
#else
|
||||
mRomDirectory = FileData::getROMDirectory();
|
||||
mRomDirectory = FileData::getROMDirectory();
|
||||
#endif
|
||||
mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory);
|
||||
mWindow->pushGui(new GuiMsgBox(HelpStyle(),
|
||||
"ROM DIRECTORY SETTING SAVED, RESTART\n"
|
||||
"THE APPLICATION TO RESCAN THE SYSTEMS",
|
||||
"OK", nullptr, "", nullptr, "", nullptr,
|
||||
true, true));
|
||||
mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory);
|
||||
mWindow->pushGui(new GuiMsgBox(HelpStyle(),
|
||||
"ROM DIRECTORY SETTING SAVED, RESTART\n"
|
||||
"THE APPLICATION TO RESCAN THE SYSTEMS",
|
||||
"OK", nullptr, "", nullptr, "", nullptr,
|
||||
true, true));
|
||||
}
|
||||
},
|
||||
false, "SAVE", "SAVE CHANGES?", "Currently configured path:",
|
||||
currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH",
|
||||
|
|
Loading…
Reference in a new issue