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
|
@ -440,40 +440,44 @@ void CFrame::InitBitmaps()
|
||||||
void CFrame::BootGame()
|
void CFrame::BootGame()
|
||||||
{
|
{
|
||||||
// Rerecording
|
// Rerecording
|
||||||
#ifdef RERECORDING
|
#ifdef RERECORDING
|
||||||
Core::RerecordingStart();
|
Core::RerecordingStart();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
{
|
{
|
||||||
if (Core::GetState() == Core::CORE_RUN)
|
if (Core::GetState() == Core::CORE_RUN)
|
||||||
{
|
|
||||||
Core::SetState(Core::CORE_PAUSE);
|
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
|
||||||
|
{
|
||||||
|
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||||
|
|
||||||
|
if (!StartUp.m_strDefaultGCM.empty()
|
||||||
|
&& wxFileExists(wxString(StartUp.m_strDefaultGCM.c_str(), wxConvUTF8)))
|
||||||
|
{
|
||||||
|
BootManager::BootCore(StartUp.m_strDefaultGCM);
|
||||||
|
}
|
||||||
|
else if (!SConfig::GetInstance().m_LastFilename.empty()
|
||||||
|
&& wxFileExists(wxString(SConfig::GetInstance().m_LastFilename.c_str(), wxConvUTF8)))
|
||||||
|
{
|
||||||
|
BootManager::BootCore(SConfig::GetInstance().m_LastFilename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Core::SetState(Core::CORE_RUN);
|
m_GameListCtrl->BrowseForDirectory();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
UpdateGUI();
|
|
||||||
}
|
|
||||||
// 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());
|
|
||||||
}
|
|
||||||
// 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)))
|
|
||||||
{
|
|
||||||
BootManager::BootCore(SConfig::GetInstance().m_LastFilename);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -735,9 +735,7 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
|
||||||
{
|
{
|
||||||
if (m_ISOFiles.size() == 0)
|
if (m_ISOFiles.size() == 0)
|
||||||
{
|
{
|
||||||
// There are no detected games, so add a GCMPath
|
return NULL;
|
||||||
BrowseForDirectory();
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue