From 31ec231d1f145b9cb273bd0d0efef5b15954b677 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 14 May 2010 14:44:14 +0000 Subject: [PATCH] MOVIEMODE_FINISHED should not store movie data into savestate. --- src/movie.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/movie.cpp b/src/movie.cpp index ebd91f43..3cdf789c 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1137,7 +1137,7 @@ void FCEU_DrawLagCounter(uint8 *XBuf) int FCEUMOV_WriteState(std::ostream* os) { //we are supposed to dump the movie data into the savestate - if(movieMode == MOVIEMODE_RECORD || movieMode == MOVIEMODE_PLAY || movieMode == MOVIEMODE_FINISHED) + if(movieMode == MOVIEMODE_RECORD || movieMode == MOVIEMODE_PLAY) return currMovieData.dump(os, true); else return 0; } @@ -1213,7 +1213,7 @@ bool FCEUMOV_ReadState(std::istream* is, uint32 size) if(movie_readonly) { //if the frame counter is longer than our current movie, then error - if(currFrameCounter > (int)currMovieData.records.size()) //adelikat: TODO: finished mode is going to throw this off + if(currFrameCounter > (int)currMovieData.records.size()) //adelikat: TODO: finished mode causes a crash if savestate is saved and loaded past movie frame count { FinishPlayback(); //TODO: turn frame counter to red to get attention