From 433ea55f1894a9b4b282052ef39a51fe846e383d Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Sun, 22 May 2011 12:40:11 +0000 Subject: [PATCH] Make InputLog log to the Movie folder, clean up some logic regarding InputLog --- BizHawk.MultiClient/MainForm.cs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 5648453942..62a4d2e1c9 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -22,8 +22,8 @@ namespace BizHawk.MultiClient private RetainedViewportPanel retainedPanel; public string CurrentlyOpenRom; - //TODO: adelikat: can this be the official file extension? - public Movie InputLog = new Movie("log.tas", MOVIEMODE.RECORD); //This movie is always recording while user is playing + //Movie variables + public Movie InputLog = new Movie("", MOVIEMODE.INACTIVE); public Movie UserMovie = new Movie("", MOVIEMODE.INACTIVE); public bool ReadOnly = true; //Global Movie Read only setting @@ -138,7 +138,7 @@ namespace BizHawk.MultiClient Movie m = new Movie(cmdMovie, MOVIEMODE.PLAY); ReadOnly = true; StartNewMovie(m, false); - InputLog.StopMovie(); + CreateNewInputLog(false); UserMovie.StartPlayback(); Global.Config.RecentMovies.Add(cmdMovie); } @@ -147,8 +147,12 @@ namespace BizHawk.MultiClient Movie m = new Movie(Global.Config.RecentMovies.GetRecentFileByPosition(0), MOVIEMODE.PLAY); ReadOnly = true; StartNewMovie(m, false); - InputLog.StopMovie(); UserMovie.StartPlayback(); + CreateNewInputLog(false); + } + else + { + CreateNewInputLog(true); } if (cmdLoadState != null && Global.Game != null) @@ -178,6 +182,16 @@ namespace BizHawk.MultiClient PauseEmulator(); } + void CreateNewInputLog(bool active) + { + MOVIEMODE m; + if (active) + m = MOVIEMODE.RECORD; + else + m = MOVIEMODE.INACTIVE; + InputLog = new Movie(Global.Config.MoviesPath + "\\log.tas", m); + } + void SyncPresentationMode() { bool gdi = Global.Config.ForceGDI;