Fix Post-Movie loadstating

This commit is contained in:
adelikat 2013-11-23 00:13:36 +00:00
parent 5651181d39
commit e5d5a4ec90
2 changed files with 14 additions and 7 deletions

View File

@ -715,6 +715,12 @@ namespace BizHawk.Client.Common
stateFrame = log.Length; //In case the frame count failed to parse, revert to using the entire state input log
}
if (_log.Length < stateFrame)
{
if (IsFinished)
{
return LoadStateResult.Pass;
}
else
{
errorMessage = "The savestate is from frame "
+ log.Length.ToString()
@ -722,6 +728,7 @@ namespace BizHawk.Client.Common
+ _log.Length.ToString();
return LoadStateResult.FutureEventError;
}
}
for (int i = 0; i < stateFrame; i++)
{
if (_log[i] != log[i])

View File

@ -385,14 +385,14 @@ namespace BizHawk.Client.Common
{
if (Global.ReadOnly)
{
var result = Movie.CheckTimeLines(reader, onlyGuid: !Global.ReadOnly, ignoreGuidMismatch: false, errorMessage: out ErrorMSG);
var result = Movie.CheckTimeLines(reader, onlyGuid: false, ignoreGuidMismatch: false, errorMessage: out ErrorMSG);
if (result != Movie.LoadStateResult.Pass)
{
if (result == Movie.LoadStateResult.GuidMismatch)
{
if (HandleGuidError())
{
var newresult = Movie.CheckTimeLines(reader, onlyGuid: !Global.ReadOnly, ignoreGuidMismatch: true, errorMessage: out ErrorMSG);
var newresult = Movie.CheckTimeLines(reader, onlyGuid: true, ignoreGuidMismatch: true, errorMessage: out ErrorMSG);
if (newresult == Movie.LoadStateResult.Pass)
{
Movie.SwitchToPlay();