Fix for state recorder load state function. Set EMUFILE_MEMORY read position back to beginning of memory block before calling FCEUSS_LoadFP.

This commit is contained in:
harry 2023-04-01 19:39:37 -04:00
parent e95c0fe86b
commit 99aefa563a
1 changed files with 2 additions and 0 deletions

View File

@ -1315,6 +1315,8 @@ class StateRecorder
EMUFILE_MEMORY *em = ringBuf[ snapIdx ]; EMUFILE_MEMORY *em = ringBuf[ snapIdx ];
em->fseek(SEEK_SET, 0);
FCEUSS_LoadFP( em, SSLOADPARAM_NOBACKUP ); FCEUSS_LoadFP( em, SSLOADPARAM_NOBACKUP );
frameCounter = lastLoadFrame = static_cast<unsigned int>(currFrameCounter); frameCounter = lastLoadFrame = static_cast<unsigned int>(currFrameCounter);