sstate: make use of mtgs to ensure thread safety when saving

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-06-16 03:22:49 +02:00 committed by Kojin
parent fa4f4bca73
commit 5a4c05607d
1 changed files with 8 additions and 1 deletions

View File

@ -51,10 +51,17 @@ struct SysState_Component
int (*freeze)(int, freezeData*);
};
int SysState_MTGSFreeze(int mode, freezeData* fP)
{
MTGS_FreezeData sstate = {fP, 0};
GetMTGS().Freeze(mode, sstate);
return sstate.retval;
}
static constexpr SysState_Component SPU2{"SPU2", SPU2freeze};
static constexpr SysState_Component PAD{"PAD", PADfreeze};
static constexpr SysState_Component USB{"USB", USBfreeze};
static constexpr SysState_Component GS{"GS", GSfreeze};
static constexpr SysState_Component GS{"GS", SysState_MTGSFreeze};
void SysState_ComponentFreezeOutRoot(void* dest, SysState_Component comp)