Qt: Fix double-clicking psexes/psfs in game list

This commit is contained in:
Connor McLaughlin
2021-03-16 01:00:47 +10:00
parent 299ba60b8d
commit a0086851ce
4 changed files with 28 additions and 25 deletions

View File

@ -939,20 +939,10 @@ void MainWindow::startGameOrChangeDiscs(const std::string& path)
// if we're not running, boot the system, otherwise swap discs
if (!m_emulation_running)
{
if (m_host_interface->GetBoolSettingValue("Main", "SaveStateOnExit", true) &&
!m_host_interface->IsCheevosChallengeModeActive())
{
const GameListEntry* entry = m_host_interface->getGameList()->GetEntryForPath(path.c_str());
if ((entry && !entry->code.empty()) || !System::GetGameCodeForPath(path.c_str(), true).empty())
{
m_host_interface->resumeSystemFromState(QString::fromStdString(path), true);
return;
}
}
if (m_host_interface->CanResumeSystemFromFile(path.c_str()))
m_host_interface->resumeSystemFromState(QString::fromStdString(path), true);
else
{
m_host_interface->bootSystem(std::make_shared<const SystemBootParameters>(path));
}
}
else
{