MOVIEMODE_FINISHED should not store movie data into savestate.

This commit is contained in:
adelikat 2010-05-14 14:44:14 +00:00
parent 49d1ebd9a3
commit 31ec231d1f
1 changed files with 2 additions and 2 deletions

View File

@ -1137,7 +1137,7 @@ void FCEU_DrawLagCounter(uint8 *XBuf)
int FCEUMOV_WriteState(std::ostream* os) int FCEUMOV_WriteState(std::ostream* os)
{ {
//we are supposed to dump the movie data into the savestate //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); return currMovieData.dump(os, true);
else return 0; else return 0;
} }
@ -1213,7 +1213,7 @@ bool FCEUMOV_ReadState(std::istream* is, uint32 size)
if(movie_readonly) if(movie_readonly)
{ {
//if the frame counter is longer than our current movie, then error //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(); FinishPlayback();
//TODO: turn frame counter to red to get attention //TODO: turn frame counter to red to get attention