diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 40a05ad53..3f6ddcec8 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -626,11 +626,17 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, case kRomDirChosenCmd: { - FilesystemNode node(instance().settings().getString("romdir")); - if(!(node.exists() && node.isDirectory())) - node = FilesystemNode("~"); + string romDir = instance().settings().getString("romdir"); - myList->setDirectory(node); + if(myList->currentDir().getPath() != romDir) + { + FilesystemNode node(romDir); + + if(!(node.exists() && node.isDirectory())) + node = FilesystemNode("~"); + + myList->setDirectory(node); + } break; } @@ -668,6 +674,8 @@ void LauncherDialog::setDefaultDir() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void LauncherDialog::openSettings() { + saveConfig(); + // Create an options dialog, similar to the in-game one if (instance().settings().getBool("basic_settings")) { diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index 72e70ecae..1b64d73f2 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -522,12 +522,15 @@ void UIDialog::handleCommand(CommandSender* sender, int cmd, int data, int id) switch(cmd) { case GuiObject::kOKCmd: + { + bool inform = myIsGlobal && + myRomPath->getText() != instance().settings().getString("romdir"); saveConfig(); close(); - if(myIsGlobal) // Let the boss know romdir has changed + if(inform) // Let the boss know romdir has changed sendCommand(LauncherDialog::kRomDirChosenCmd, 0, 0); break; - + } case GuiObject::kDefaultsCmd: setDefaults(); break;