Better error handling in the event of wrong timeline. Loadstate is canceled, error message displayed, and movie continues playing.
This commit is contained in:
parent
1415fb402c
commit
dc61c4c414
|
@ -1314,14 +1314,15 @@ bool FCEUMOV_ReadState(std::istream* is, uint32 size)
|
||||||
FinishPlayback();
|
FinishPlayback();
|
||||||
//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.", currFrameCounter, currMovieData.records.size()-1);
|
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;
|
movieMode = MOVIEMODE_PLAY;
|
||||||
}
|
}
|
||||||
else
|
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!");
|
FCEU_PrintError("Error: Savestate not in the same timeline as movie!");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue