pad: separate full and per-pad sstate

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2021-05-14 17:15:41 +02:00 committed by Kojin
parent 9cb0093a1a
commit 80c67e2d48
2 changed files with 6 additions and 6 deletions

View File

@ -159,15 +159,15 @@ s32 PADfreeze(int mode, freezeData* data)
if (mode == FREEZE_SIZE)
{
data->size = sizeof(PadFreezeData);
data->size = sizeof(PadFullFreezeData);
}
else if (mode == FREEZE_LOAD)
{
PadFreezeData* pdata = (PadFreezeData*)(data->data);
PadFullFreezeData* pdata = (PadFullFreezeData*)(data->data);
Pad::stop_vibrate_all();
if (data->size != sizeof(PadFreezeData) || pdata->version != PAD_SAVE_STATE_VERSION ||
if (data->size != sizeof(PadFullFreezeData) || pdata->version != PAD_SAVE_STATE_VERSION ||
strncmp(pdata->format, "LinPad", sizeof(pdata->format)))
return 0;
@ -199,10 +199,10 @@ s32 PADfreeze(int mode, freezeData* data)
}
else if (mode == FREEZE_SAVE)
{
if (data->size != sizeof(PadFreezeData))
if (data->size != sizeof(PadFullFreezeData))
return 0;
PadFreezeData* pdata = (PadFreezeData*)(data->data);
PadFullFreezeData* pdata = (PadFullFreezeData*)(data->data);
// Tales of the Abyss - pad fix
// - PCSX2 only saves port0 (save #1), then port1 (save #2)

View File

@ -95,7 +95,7 @@ public:
};
// Full state to manage save state
struct PadFreezeData
struct PadFullFreezeData
{
char format[8];
u32 version;