settings: ensure gs settings are applied on close/make gs sstate

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-06-20 00:23:37 +02:00 committed by Kojin
parent 3ca8ada424
commit 23c0b0f7b1
2 changed files with 10 additions and 2 deletions

View File

@ -701,7 +701,6 @@ int GSfreeze(int mode, freezeData* data)
void GSconfigure()
{
ScopedCoreThreadPause paused_core;
try
{
if (!GSUtil::CheckSSE())
@ -747,7 +746,6 @@ void GSconfigure()
catch (GSRecoverableError)
{
}
paused_core.AllowResume();
}
int GStest()

View File

@ -90,7 +90,17 @@ void MainEmuFrame::Menu_PADSettings_Click(wxCommandEvent& event)
void MainEmuFrame::Menu_GSSettings_Click(wxCommandEvent& event)
{
ScopedCoreThreadPause paused_core;
freezeData fP = {0, nullptr};
MTGS_FreezeData sstate = {&fP, 0};
GetMTGS().Freeze(FREEZE_SIZE, sstate);
fP.data = new char[fP.size];
GetMTGS().Freeze(FREEZE_SAVE, sstate);
GetMTGS().Suspend(true);
GSconfigure();
GetMTGS().Freeze(FREEZE_LOAD, sstate);
delete[] fP.data;
paused_core.AllowResume();
}
void MainEmuFrame::Menu_WindowSettings_Click(wxCommandEvent& event)