GPU: Allow closing window/app to interrupt shader compilation

This commit is contained in:
Connor McLaughlin
2021-02-19 01:48:44 +10:00
parent 413e52b38d
commit 24c2165bb3
8 changed files with 88 additions and 16 deletions

View File

@ -825,6 +825,7 @@ void QtHostInterface::powerOffSystem()
{
if (!isOnWorkerThread())
{
System::CancelPendingStartup();
QMetaObject::invokeMethod(this, "powerOffSystem", Qt::QueuedConnection);
return;
}
@ -839,6 +840,7 @@ void QtHostInterface::powerOffSystemWithoutSaving()
{
if (!isOnWorkerThread())
{
System::CancelPendingStartup();
QMetaObject::invokeMethod(this, "powerOffSystemWithoutSaving", Qt::QueuedConnection);
return;
}
@ -849,9 +851,14 @@ void QtHostInterface::powerOffSystemWithoutSaving()
void QtHostInterface::synchronousPowerOffSystem()
{
if (!isOnWorkerThread())
{
System::CancelPendingStartup();
QMetaObject::invokeMethod(this, "powerOffSystem", Qt::BlockingQueuedConnection);
}
else
{
powerOffSystem();
}
}
void QtHostInterface::resetSystem()