Skip to content

Commit

Permalink
Merge pull request #5516 from leoetlino/drop-last-filename
Browse files Browse the repository at this point in the history
Drop m_LastFilename
  • Loading branch information
leoetlino committed Jun 3, 2017
2 parents fbad958 + 6e02af1 commit bcc85f9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 26 deletions.
2 changes: 0 additions & 2 deletions Source/Core/Core/BootManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ bool BootCore(const std::string& filename, SConfig::EBootBS2 type)

StartUp.m_BootType = SConfig::BOOT_ISO;
StartUp.m_strFilename = filename;
StartUp.m_LastFilename = filename;
StartUp.SaveSettings();
StartUp.bRunCompareClient = false;
StartUp.bRunCompareServer = false;

Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ void SConfig::SaveGeneralSettings(IniFile& ini)
IniFile::Section* general = ini.GetOrCreateSection("General");

// General
general->Set("LastFilename", m_LastFilename);
general->Set("ShowLag", m_ShowLag);
general->Set("ShowFrameCount", m_ShowFrameCount);

Expand Down Expand Up @@ -418,7 +417,6 @@ void SConfig::LoadGeneralSettings(IniFile& ini)
{
IniFile::Section* general = ini.GetOrCreateSection("General");

general->Get("LastFilename", &m_LastFilename);
general->Get("ShowLag", &m_ShowLag, false);
general->Get("ShowFrameCount", &m_ShowFrameCount, false);
#ifdef USE_GDBSTUB
Expand Down
3 changes: 0 additions & 3 deletions Source/Core/Core/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ struct SConfig : NonCopyable
bool m_WiimoteContinuousScanning;
bool m_WiimoteEnableSpeaker;

// name of the last used filename
std::string m_LastFilename;

// ISO folder
std::vector<std::string> m_ISOFolder;
bool m_RecursiveISOFolder;
Expand Down
21 changes: 2 additions & 19 deletions Source/Core/DolphinWX/FrameTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bcc85f9

Please sign in to comment.