From 2072eac45f91384867b89d242111a06d4069df75 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 11 Jul 2014 18:06:18 +0000 Subject: [PATCH] Some Changes flag management in movie objects --- BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs | 2 ++ BizHawk.Client.Common/movie/bkm/BkmMovie.IO.cs | 3 +++ BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs | 2 ++ BizHawk.Client.Common/movie/tasproj/TasMovie.cs | 5 +++++ BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs | 1 + 5 files changed, 13 insertions(+) diff --git a/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs b/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs index 59e740004d..9a84811428 100644 --- a/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs +++ b/BizHawk.Client.Common/movie/bk2/Bk2Movie.IO.cs @@ -121,6 +121,8 @@ namespace BizHawk.Client.Common }); } } + + Changes = false; return true; } diff --git a/BizHawk.Client.Common/movie/bkm/BkmMovie.IO.cs b/BizHawk.Client.Common/movie/bkm/BkmMovie.IO.cs index 2c99775ada..a8f1be0f29 100644 --- a/BizHawk.Client.Common/movie/bkm/BkmMovie.IO.cs +++ b/BizHawk.Client.Common/movie/bkm/BkmMovie.IO.cs @@ -111,6 +111,7 @@ namespace BizHawk.Client.Common BinarySavestate = Convert.FromBase64String(Header.SavestateBinaryBase64Blob); Loaded = true; + _changes = false; return true; } @@ -258,6 +259,8 @@ namespace BizHawk.Client.Common } } } + + _changes = false; } } } diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs index 427a7bb331..938a0375fd 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs @@ -176,6 +176,8 @@ namespace BizHawk.Client.Common } }); } + + Changes = false; return true; } diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index 8e3052eab8..ea2d213bcb 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -43,6 +43,11 @@ namespace BizHawk.Client.Common } } + public void ClearChanges() + { + Changes = false; + } + public override void StartNewRecording() { LagLog.Clear(); diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 3c23c200ad..d49f51edab 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -127,6 +127,7 @@ namespace BizHawk.Client.EmuHawk _tas = Global.MovieSession.Movie as TasMovie; _tas.Filename = DefaultTasProjName(); // TODO don't do this, take over any mainform actions that can crash without a filename _tas.PopulateWithDefaultHeaderValues(); + _tas.ClearChanges(); } private static string DefaultTasProjName()