Read-only loadstate - revert a logic error I had in determining a "future event" error.
This commit is contained in:
parent
4e66aaef9c
commit
cec1766f34
|
@ -1206,7 +1206,7 @@ int FCEUMOV_WriteState(EMUFILE* os)
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckTimelines(MovieData& stateMovie, MovieData& currMovie, int& error)
|
bool CheckTimelines(MovieData& stateMovie, MovieData& currMovie, int& errorFr)
|
||||||
{
|
{
|
||||||
bool isInTimeline = true;
|
bool isInTimeline = true;
|
||||||
int length;
|
int length;
|
||||||
|
@ -1227,7 +1227,7 @@ bool CheckTimelines(MovieData& stateMovie, MovieData& currMovie, int& error)
|
||||||
if (!stateMovie.records[x].Compare(currMovie.records[x]))
|
if (!stateMovie.records[x].Compare(currMovie.records[x]))
|
||||||
{
|
{
|
||||||
isInTimeline = false;
|
isInTimeline = false;
|
||||||
error = x;
|
errorFr = x;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1313,8 +1313,8 @@ bool FCEUMOV_ReadState(EMUFILE* is, uint32 size)
|
||||||
{
|
{
|
||||||
//if we made it this far, then the savestate has identical movie data but we want to know now if the stateMOVIE size is greater than current movie size and make this error
|
//if we made it this far, then the savestate has identical movie data but we want to know now if the stateMOVIE size is greater than current movie size and make this error
|
||||||
|
|
||||||
|
//currFrameCounter at this point represents the savestate framecount
|
||||||
if(tempMovieData.records.size() > currMovieData.records.size())
|
if(currFrameCounter > currMovieData.records.size())
|
||||||
{
|
{
|
||||||
//TODO: turn frame counter to red to get attention
|
//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.", tempMovieData.records.size(), currMovieData.records.size()-1);
|
FCEU_PrintError("Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.", tempMovieData.records.size(), currMovieData.records.size()-1);
|
||||||
|
|
Loading…
Reference in New Issue