mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Do not BootGame if there are no items in the GameListCtrl, fix test to see if cancel was chosen from File > Open.
Fixes issue 1046. it does leak 10kB every time that GetSelectedISO is called, I am not too worried about this. The other ways of accomplishing this would be more complicated, for little gain. Feel free to revert everything except line 466 of FrameTools.cpp :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3625 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -420,8 +420,9 @@ void CFrame::BootGame()
|
||||
}
|
||||
UpdateGUI();
|
||||
}
|
||||
// Start the selected ISO
|
||||
else if (m_GameListCtrl->GetSelectedISO() != 0)
|
||||
// Start the selected ISO, return if gamelist is empty
|
||||
else if (m_GameListCtrl->GetSelectedISO() == 0) return;
|
||||
else if (m_GameListCtrl->GetSelectedISO()->IsValid())
|
||||
{
|
||||
BootManager::BootCore(m_GameListCtrl->GetSelectedISO()->GetFileName());
|
||||
}
|
||||
@ -462,7 +463,7 @@ void CFrame::DoOpen(bool Boot)
|
||||
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
|
||||
this);
|
||||
|
||||
bool fileChosen = path ? true : false;
|
||||
bool fileChosen = !path.IsEmpty();
|
||||
|
||||
std::string currentDir2 = File::GetCurrentDirectory();
|
||||
|
||||
|
Reference in New Issue
Block a user