mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 08:05:41 +00:00
Qt: Fix resume without any state wedging emu
This commit is contained in:
parent
10d9b17b4f
commit
7cf8f60464
|
@ -361,23 +361,24 @@ void QtHostInterface::resumeSystemFromState(const QString& filename, bool boot_o
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string state_filename = filename.toStdString();
|
||||||
|
if (state_filename.empty())
|
||||||
|
{
|
||||||
|
state_filename = GetMostRecentResumeSaveStatePath();
|
||||||
|
if (state_filename.empty())
|
||||||
|
{
|
||||||
|
emit errorReported(tr("No resume save state found."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
emit emulationStarting();
|
emit emulationStarting();
|
||||||
if (filename.isEmpty())
|
ResumeSystemFromState(state_filename.c_str(), boot_on_failure);
|
||||||
ResumeSystemFromMostRecentState();
|
|
||||||
else
|
|
||||||
ResumeSystemFromState(filename.toStdString().c_str(), boot_on_failure);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtHostInterface::resumeSystemFromMostRecentState()
|
void QtHostInterface::resumeSystemFromMostRecentState()
|
||||||
{
|
{
|
||||||
if (!isOnWorkerThread())
|
resumeSystemFromState(QString(), false);
|
||||||
{
|
|
||||||
QMetaObject::invokeMethod(this, "resumeSystemFromMostRecentState");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
emit emulationStarting();
|
|
||||||
ResumeSystemFromMostRecentState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtHostInterface::onDisplayWindowKeyEvent(int key, bool pressed)
|
void QtHostInterface::onDisplayWindowKeyEvent(int key, bool pressed)
|
||||||
|
|
Loading…
Reference in a new issue