Movies - Fixed read-only loadstate error logic & messages
This commit is contained in:
parent
7b53114862
commit
b03401b198
|
@ -1,3 +1,4 @@
|
|||
09-june-2010 - adelikat - Movies - Fixed read-only loadstate error logic & messages
|
||||
07-june-2010 - mart0258 - Movie loading now faster - TAS savestates moved from class MovieRecord to class MovieData
|
||||
07-june-2010 - adelikat - Lua - new function: gui.screenshotas()
|
||||
07-june-2010 - Deign/adelikat - Win32 - Added a SavestateAs Menu item
|
||||
|
|
|
@ -1393,17 +1393,19 @@ bool FCEUMOV_ReadState(EMUFILE* is, uint32 size)
|
|||
if(currFrameCounter > (int)currMovieData.records.size())
|
||||
{
|
||||
//TODO: turn frame counter to red to get attention
|
||||
|
||||
if (! (currFrameCounter > (int)tempMovieData.records.size() ) ) //This seemingly redundant check is necessary in order to not flag a post movie savestate as an error
|
||||
{
|
||||
if (!backupSavestates) //If backups are disabled we can just resume normally since we can't restore so stop movie and inform user
|
||||
{
|
||||
FCEU_PrintError("Error: Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.\nUnable to restore backup, movie playback stopped.", errorFrame);
|
||||
FCEU_PrintError("Error: Savestate is from a frame (%d) after the final frame in the movie (%d). This is not permitted.\nUnable to restore backup, movie playback stopped.", currFrameCounter, currMovieData.records.size()-1);
|
||||
FCEUI_StopMovie();
|
||||
}
|
||||
else
|
||||
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.", currFrameCounter, currMovieData.records.size()-1);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Final test, if the savestate frame count is > savestate movie length, this was a post movie savestate
|
||||
|
|
Loading…
Reference in New Issue