Qt: Fix power off button not exiting in batch mode

This commit is contained in:
Connor McLaughlin 2020-10-29 17:38:25 +10:00
parent 3394575dca
commit 62dbaaf02c
2 changed files with 4 additions and 7 deletions

View File

@ -765,13 +765,7 @@ void QtHostInterface::powerOffSystem()
return;
}
if (System::IsShutdown())
return;
if (g_settings.save_state_on_exit)
SaveResumeSaveState();
DestroySystem();
PowerOffSystem();
}
void QtHostInterface::synchronousPowerOffSystem()

View File

@ -183,6 +183,9 @@ void CommonHostInterface::DestroySystem()
void CommonHostInterface::PowerOffSystem()
{
if (System::IsShutdown())
return;
if (g_settings.save_state_on_exit)
SaveResumeSaveState();