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

@ -716,11 +716,18 @@ namespace BizHawk.Client.Common
}
if (_log.Length < stateFrame)
{
errorMessage = "The savestate is from frame "
+ log.Length.ToString()
+ " which is greater than the current movie length of "
+ _log.Length.ToString();
return LoadStateResult.FutureEventError;
if (IsFinished)
{
return LoadStateResult.Pass;
}
else
{
errorMessage = "The savestate is from frame "
+ log.Length.ToString()
+ " which is greater than the current movie length of "
+ _log.Length.ToString();
return LoadStateResult.FutureEventError;
}
}
for (int i = 0; i < stateFrame; 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();