gs: ensure gsclose is sent from the main mtgs thread and not sysexecutor

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-06-16 01:13:43 +02:00 committed by Kojin
parent 70a6c59126
commit 0009ff8853
1 changed files with 1 additions and 1 deletions

View File

@ -594,13 +594,13 @@ void SysMtgsThread::CloseGS()
{ {
if (!m_Opened || GSDump::isRunning) if (!m_Opened || GSDump::isRunning)
return; return;
GSclose();
m_Opened = false; m_Opened = false;
Suspend(); Suspend();
} }
void SysMtgsThread::OnSuspendInThread() void SysMtgsThread::OnSuspendInThread()
{ {
GSclose();
GetSysExecutorThread().PostEvent(new SysExecEvent_InvokeMtgsThreadMethod(&SysMtgsThread::CloseGS)); GetSysExecutorThread().PostEvent(new SysExecEvent_InvokeMtgsThreadMethod(&SysMtgsThread::CloseGS));
_parent::OnSuspendInThread(); _parent::OnSuspendInThread();
} }