mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 14:25:37 +00:00
Qt: Fix resume with a save state again
This commit is contained in:
parent
c6582bb7e4
commit
9bf1d61f4f
|
@ -361,24 +361,23 @@ void QtHostInterface::resumeSystemFromState(const QString& filename, bool boot_o
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string state_filename = filename.toStdString();
|
emit emulationStarting();
|
||||||
if (state_filename.empty())
|
if (filename.isEmpty())
|
||||||
{
|
ResumeSystemFromMostRecentState();
|
||||||
state_filename = GetMostRecentResumeSaveStatePath();
|
else
|
||||||
|
ResumeSystemFromState(filename.toStdString().c_str(), boot_on_failure);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtHostInterface::resumeSystemFromMostRecentState()
|
||||||
|
{
|
||||||
|
std::string state_filename = GetMostRecentResumeSaveStatePath();
|
||||||
if (state_filename.empty())
|
if (state_filename.empty())
|
||||||
{
|
{
|
||||||
emit errorReported(tr("No resume save state found."));
|
emit errorReported(tr("No resume save state found."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
emit emulationStarting();
|
loadState(QString::fromStdString(state_filename));
|
||||||
ResumeSystemFromState(state_filename.c_str(), boot_on_failure);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QtHostInterface::resumeSystemFromMostRecentState()
|
|
||||||
{
|
|
||||||
resumeSystemFromState(QString(), false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtHostInterface::onDisplayWindowKeyEvent(int key, bool pressed)
|
void QtHostInterface::onDisplayWindowKeyEvent(int key, bool pressed)
|
||||||
|
|
Loading…
Reference in a new issue