Drop m_LastFilename

This makes it hard to support different boot params for different boot
types. We should not be making the assumption that Dolphin will
always be booting directly from a file (and in particular, only
using a string).

It's incompatible with future changes that will allow Dolphin to boot
a NAND title properly from well, the NAND, as opposed to booting from
WADs. (And no, treating the title TMD as a "bootable" path doesn't
count. Especially when that approach won't work with NAND images
or IOS LLE.)

And it's confusing to expose this functionality from the UI. It's
pretty bad for UX to change the play button's behaviour depending on
whether the user has launched something before, configured a default
file to boot, added a directory to their game paths.
This commit is contained in:
Léo Lam
2017-05-27 12:15:07 +02:00
parent 0ff8e2b36f
commit 677640ac52
4 changed files with 2 additions and 25 deletions

View File

@ -309,16 +309,8 @@ void CFrame::BootGame(const std::string& filename)
}
else
{
if (!SConfig::GetInstance().m_LastFilename.empty() &&
File::Exists(SConfig::GetInstance().m_LastFilename))
{
bootfile = SConfig::GetInstance().m_LastFilename;
}
else
{
m_game_list_ctrl->BrowseForDirectory();
return;
}
m_game_list_ctrl->BrowseForDirectory();
return;
}
}
if (!bootfile.empty())
@ -1550,15 +1542,6 @@ void CFrame::UpdateGUI()
GetMenuBar()->FindItem(IDM_RECORD)->Enable();
GetMenuBar()->FindItem(IDM_PLAY_RECORD)->Enable();
}
// Prepare to load last selected file, enable play button
else if (!SConfig::GetInstance().m_LastFilename.empty() &&
File::Exists(SConfig::GetInstance().m_LastFilename))
{
GetToolBar()->EnableTool(IDM_PLAY, true);
GetMenuBar()->FindItem(IDM_PLAY)->Enable();
GetMenuBar()->FindItem(IDM_RECORD)->Enable();
GetMenuBar()->FindItem(IDM_PLAY_RECORD)->Enable();
}
else
{
// No game has been selected yet, disable play button