From 535ba7dc4a62f3d3f1a0d26ccd95411b5d056f31 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 2 Oct 2014 23:10:36 +0000 Subject: [PATCH] TasStateManager - don't delete frame 0 greenzone, todo: refactor to store this (for non-savestate anchored movies) separately --- BizHawk.Client.Common/movie/tasproj/TasStateManager.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs b/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs index 2e640c4551..17b3742dc9 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasStateManager.cs @@ -138,8 +138,15 @@ namespace BizHawk.Client.Common /// public void Clear() { + var power = States.FirstOrDefault(s => s.Key == 0); States.Clear(); - Used = 0; + + if (power.Value.Length > 0) + { + States.Add(0, power.Value); + } + + Used = power.Value.Length; } public void Save(BinaryWriter bw)