From dc61c4c41408804928182573c8c67790acab81ab Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 15 May 2010 04:24:29 +0000 Subject: [PATCH] Better error handling in the event of wrong timeline. Loadstate is canceled, error message displayed, and movie continues playing. --- src/movie.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/movie.cpp b/src/movie.cpp index fd561ed4..577128f1 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -1314,14 +1314,15 @@ bool FCEUMOV_ReadState(std::istream* is, uint32 size) FinishPlayback(); //TODO: turn frame counter to red to get attention FCEU_PrintError("Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.", currFrameCounter, currMovieData.records.size()-1); - //return false; + return false; } movieMode = MOVIEMODE_PLAY; } else { - //Wrong time line failed, do apprioriate logic here + //Wrong timeline, do apprioriate logic here FCEU_PrintError("Error: Savestate not in the same timeline as movie!"); + return false; } } else