From 99aefa563a32078e9fefe549b2cc0d096b1a558b Mon Sep 17 00:00:00 2001 From: harry Date: Sat, 1 Apr 2023 19:39:37 -0400 Subject: [PATCH] Fix for state recorder load state function. Set EMUFILE_MEMORY read position back to beginning of memory block before calling FCEUSS_LoadFP. --- src/state.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/state.cpp b/src/state.cpp index 9faa189d..d2bd658d 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -1315,6 +1315,8 @@ class StateRecorder EMUFILE_MEMORY *em = ringBuf[ snapIdx ]; + em->fseek(SEEK_SET, 0); + FCEUSS_LoadFP( em, SSLOADPARAM_NOBACKUP ); frameCounter = lastLoadFrame = static_cast(currFrameCounter);