mirror of https://github.com/stella-emu/stella.git
fixed #686 (launcher losing navigation)
This commit is contained in:
parent
d29a74af5e
commit
6887722448
|
@ -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"))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue