From 2a4cba4f7e75359bfa4b65f45b1d556a05c3874c Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 5 Aug 2020 20:48:08 -0500 Subject: [PATCH] remove option to not save SavestateHistory in .tasproj files, turns out the pre-zwinder implemetnation never exposed a way to turn this off either (except direct json editing). And it seems questionable, we have export to .bk2, clear history, auto-save options, etc if you need a historyless file --- .../movie/tasproj/TasMovie.IO.cs | 11 ++++------- .../movie/tasproj/ZwinderStateManagerSettings.cs | 5 ----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs index 71a75f8fbd..0c83e77fa5 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs @@ -41,7 +41,7 @@ namespace BizHawk.Client.Common bs.PutLump(BinaryStateLump.Session, tw => tw.WriteLine(JsonConvert.SerializeObject(TasSession))); - if (TasStateManager.Settings.SaveStateHistory && !isBackup) + if (!isBackup) { bs.PutLump(BinaryStateLump.StateHistory, bw => TasStateManager.SaveStateHistory(bw)); } @@ -165,13 +165,10 @@ namespace BizHawk.Client.Common } }); - if (TasStateManager.Settings.SaveStateHistory) + bl.GetLump(BinaryStateLump.StateHistory, false, delegate(BinaryReader br, long length) { - bl.GetLump(BinaryStateLump.StateHistory, false, delegate(BinaryReader br, long length) - { - TasStateManager = ZwinderStateManager.Create(br, TasStateManager.Settings); - }); - } + TasStateManager = ZwinderStateManager.Create(br, TasStateManager.Settings); + }); } } } diff --git a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManagerSettings.cs b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManagerSettings.cs index 9d39642911..1e854ab264 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManagerSettings.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/ZwinderStateManagerSettings.cs @@ -21,7 +21,6 @@ namespace BizHawk.Client.Common PriorityTargetFrameLength = settings.PriorityTargetFrameLength; AncientStateInterval = settings.AncientStateInterval; - SaveStateHistory = settings.SaveStateHistory; } /// @@ -69,9 +68,5 @@ namespace BizHawk.Client.Common [DisplayName("Ancient State Interval")] [Description("How often to maintain states when outside of Current and Recent intervals")] public int AncientStateInterval { get; set; } = 5000; - - [DisplayName("Save Savestate History")] - [Description("Whether or not to save savestate history into .tasproj files")] - public bool SaveStateHistory { get; set; } = true; } }