Movies: reorder code so that record mode is not entered if state load failed

This commit is contained in:
alyosha-tas 2020-11-20 17:25:01 -05:00
parent 320ecc9093
commit d676036359
1 changed files with 8 additions and 7 deletions

View File

@ -162,6 +162,14 @@ namespace BizHawk.Client.Common
}
else
{
// Don't enter recording mode if state load fails
var result = Movie.ExtractInputLog(reader, out var errorMsg);
if (!result)
{
Output(errorMsg);
return false;
}
if (Movie.IsFinished())
{
Movie.StartNewRecording();
@ -172,13 +180,6 @@ namespace BizHawk.Client.Common
}
LatchInputToUser();
var result = Movie.ExtractInputLog(reader, out var errorMsg);
if (!result)
{
Output(errorMsg);
return false;
}
}
return true;