Save States: Oops! Fix a bug where 3D vertices were getting double-loaded, causing save state file reads to desync. Fixes #629. (Regression from commit 5426509e.)

- Problems only occurred when LOADING a save state. However, SAVING a save state on commit 5426509e should be okay, so such save states should not be broken.
This commit is contained in:
rogerman 2023-02-01 15:17:20 -08:00
parent 5bcfd2f022
commit a3e84e28c2
1 changed files with 2 additions and 2 deletions

View File

@ -3012,7 +3012,7 @@ bool gfx3d_loadstate(EMUFILE &is, int size)
for (size_t i = 0; i < gfx3d.gList[gfx3d.appliedListIndex].vertListCount; i++)
{
gfx3d.gList[gfx3d.pendingListIndex].vertList[i].load(is);
gfx3d.gList[gfx3d.appliedListIndex].vertList[i].load(is);
gfx3d.gList[gfx3d.appliedListIndex].vertList[i] = gfx3d.gList[gfx3d.pendingListIndex].vertList[i];
}
is.read_32LE(polyListCount32);
@ -3021,7 +3021,7 @@ bool gfx3d_loadstate(EMUFILE &is, int size)
for (size_t i = 0; i < gfx3d.gList[gfx3d.appliedListIndex].polyCount; i++)
{
gfx3d.gList[gfx3d.pendingListIndex].polyList[i].load(is);
gfx3d.gList[gfx3d.appliedListIndex].polyList[i].load(is);
gfx3d.gList[gfx3d.appliedListIndex].polyList[i] = gfx3d.gList[gfx3d.pendingListIndex].polyList[i];
}
}