From 182ce33a3c4f8f86a68f0590d1a10f6f98468129 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 25 Jul 2015 18:02:58 -0400 Subject: [PATCH] Tastudio branches - invalidate lag log on branch load for now, even though the information is saved in branches and is valid (todo: a better design or quit saving this info). Also don't load the changelog from branches, again, don't save this info if this isn't desired. --- BizHawk.Client.Common/movie/tasproj/TasLagLog.cs | 4 ++-- BizHawk.Client.Common/movie/tasproj/TasMovie.cs | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/BizHawk.Client.Common/movie/tasproj/TasLagLog.cs b/BizHawk.Client.Common/movie/tasproj/TasLagLog.cs index f837584c25..7f573d55ea 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasLagLog.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasLagLog.cs @@ -177,8 +177,8 @@ namespace BizHawk.Client.Common public void FromLagLog(TasLagLog log) { - LagLog = log.LagLog; - WasLag = log.WasLag; + LagLog = log.LagLog.ToList(); + WasLag = log.WasLag.ToList(); } public void StartFromFrame(int index) diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index 598252413f..ac477bcfba 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -461,10 +461,14 @@ namespace BizHawk.Client.Common _log = branch.InputLog; _changes = true; + LagLog.FromLagLog(branch.LagLog); if (divergentPoint.HasValue) { StateManager.Invalidate(divergentPoint.Value); + + // For now, even though we loaded the lag log, we are invalidating it the same as savestates to show the user the space isn't navigatable without re-emulating + LagLog.RemoveFrom(divergentPoint.Value); } else { @@ -472,9 +476,9 @@ namespace BizHawk.Client.Common } StateManager.SetState(branch.Frame, branch.CoreData); - //LagLog.Clear(); LagLog and InputLog is the same reference as what's in the branch! - LagLog.FromLagLog(branch.LagLog); - ChangeLog = branch.ChangeLog; + + // TODO: we save the changelog, but not to disk, also this may not be intended behavior + //ChangeLog = branch.ChangeLog; } // TODO: use LogGenerators rather than string comparisons