From 8f7b0aaac980909b11438df52019338eab48358f Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 2 Feb 2020 11:38:12 -0600 Subject: [PATCH] Movie Session - move some logic out of hacky step 1 and into hacky step 2 --- BizHawk.Client.Common/movie/MovieSession.cs | 36 ++++++++------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/BizHawk.Client.Common/movie/MovieSession.cs b/BizHawk.Client.Common/movie/MovieSession.cs index fb83ad47fd..7edd229879 100644 --- a/BizHawk.Client.Common/movie/MovieSession.cs +++ b/BizHawk.Client.Common/movie/MovieSession.cs @@ -318,12 +318,7 @@ namespace BizHawk.Client.Common // TODO: maybe someone who understands more about what's going on here could rename these step1 and step2 into something more descriptive public bool HandleMovieLoadState_HackyStep1(TextReader reader) { - if (!Movie.IsActive()) - { - return true; - } - - if (ReadOnly) + if (Movie.IsActive() && ReadOnly) { var result = Movie.CheckTimeLines(reader, out var errorMsg); if (!result) @@ -331,7 +326,20 @@ namespace BizHawk.Client.Common Output(errorMsg); return false; } + } + return true; + } + + public bool HandleMovieLoadState_HackyStep2(TextReader reader) + { + if (Movie.NotActive()) + { + return true; + } + + if (ReadOnly) + { if (Movie.IsRecording()) { Movie.SwitchToPlay(); @@ -351,23 +359,7 @@ namespace BizHawk.Client.Common { Movie.SwitchToRecord(); } - } - return true; - } - - public bool HandleMovieLoadState_HackyStep2(TextReader reader) - { - if (Movie.NotActive()) - { - return true; - } - - if (ReadOnly) - { - } - else - { var result = Movie.ExtractInputLog(reader, out var errorMsg); if (!result) {