Qt: Add shutdown without saving menu option

This commit is contained in:
Connor McLaughlin
2021-01-08 23:42:17 +10:00
parent 6a04803502
commit b0398f5aa7
10 changed files with 43 additions and 5 deletions

View File

@ -808,6 +808,20 @@ void QtHostInterface::powerOffSystem()
return;
}
if (g_settings.save_state_on_exit)
SaveResumeSaveState();
PowerOffSystem();
}
void QtHostInterface::powerOffSystemWithoutSaving()
{
if (!isOnWorkerThread())
{
QMetaObject::invokeMethod(this, "powerOffSystemWithoutSaving", Qt::QueuedConnection);
return;
}
PowerOffSystem();
}