Fixes issue 1356.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4271 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
65b6b15c6e
commit
9f0ff64398
|
@ -447,34 +447,38 @@ void CFrame::BootGame()
|
|||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
if (Core::GetState() == Core::CORE_RUN)
|
||||
{
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
else
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
UpdateGUI();
|
||||
}
|
||||
// Start the selected ISO, or try one of the saved paths.
|
||||
// If all that fails, ask to add a dir and don't boot
|
||||
else if (m_GameListCtrl->GetSelectedISO() != NULL)
|
||||
{
|
||||
if (m_GameListCtrl->GetSelectedISO()->IsValid())
|
||||
BootManager::BootCore(m_GameListCtrl->GetSelectedISO()->GetFileName());
|
||||
}
|
||||
else
|
||||
{
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
}
|
||||
UpdateGUI();
|
||||
}
|
||||
// Start the selected ISO, return if gamelist is empty
|
||||
else if (m_GameListCtrl->GetSelectedISO() == 0) return;
|
||||
else if (m_GameListCtrl->GetSelectedISO()->IsValid())
|
||||
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
if (!StartUp.m_strDefaultGCM.empty()
|
||||
&& wxFileExists(wxString(StartUp.m_strDefaultGCM.c_str(), wxConvUTF8)))
|
||||
{
|
||||
BootManager::BootCore(m_GameListCtrl->GetSelectedISO()->GetFileName());
|
||||
BootManager::BootCore(StartUp.m_strDefaultGCM);
|
||||
}
|
||||
// Start the default ISO, or if we don't have a default ISO, start the last
|
||||
// started ISO
|
||||
else if (!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.empty() &&
|
||||
wxFileExists(wxString(SConfig::GetInstance().m_LocalCoreStartupParameter.
|
||||
m_strDefaultGCM.c_str(), wxConvUTF8)))
|
||||
{
|
||||
BootManager::BootCore(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM);
|
||||
}
|
||||
else if (!SConfig::GetInstance().m_LastFilename.empty() &&
|
||||
wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
|
||||
else if (!SConfig::GetInstance().m_LastFilename.empty()
|
||||
&& wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
|
||||
{
|
||||
BootManager::BootCore(SConfig::GetInstance().m_LastFilename);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_GameListCtrl->BrowseForDirectory();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Open file to boot
|
||||
|
|
|
@ -735,9 +735,7 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
|
|||
{
|
||||
if (m_ISOFiles.size() == 0)
|
||||
{
|
||||
// There are no detected games, so add a GCMPath
|
||||
BrowseForDirectory();
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue