MTGS: Sync privileged registers before loading state

Fixes display registers not being present for the first frame when
loading GS dumps.
This commit is contained in:
Stenzek 2023-06-10 21:57:27 +10:00 committed by Connor McLaughlin
parent 9acb98a2c8
commit 14ee1b40d0
1 changed files with 6 additions and 1 deletions

View File

@ -889,8 +889,13 @@ void SysMtgsThread::Freeze(FreezeAction mode, MTGS_FreezeData& data)
{
pxAssertRel(IsOpen(), "GS thread is open");
pxAssertDev(std::this_thread::get_id() != m_thread.get_id(), "This method is only allowed from threads *not* named MTGS.");
// synchronize regs before loading
if (mode == FreezeAction::Load)
WaitGS(true);
SendPointerPacket(GS_RINGTYPE_FREEZE, (int)mode, &data);
WaitGS();
WaitGS(false);
}
void SysMtgsThread::RunOnGSThread(AsyncCallType func)