VMManager: Ensure MTGS is finished before resetting

This commit is contained in:
Connor McLaughlin 2022-09-16 00:09:35 +10:00 committed by refractionpcsx2
parent 1a979a8498
commit a2c140c87f
1 changed files with 5 additions and 0 deletions

View File

@ -1057,9 +1057,14 @@ void VMManager::Shutdown(bool save_resume_state)
// If the fullscreen UI is running, do a hardware reset on the GS
// so that the texture cache and targets are all cleared.
if (s_gs_open_on_initialize)
{
GetMTGS().WaitGS(false, false, false);
GetMTGS().ResetGS(true);
}
else
{
GetMTGS().WaitForClose();
}
USBshutdown();
SPU2shutdown();