diff --git a/BizHawk.Client.Common/BizHawk.Client.Common.csproj b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
index cb66b388fd..a01445b85c 100644
--- a/BizHawk.Client.Common/BizHawk.Client.Common.csproj
+++ b/BizHawk.Client.Common/BizHawk.Client.Common.csproj
@@ -187,6 +187,7 @@
+
diff --git a/BizHawk.Client.Common/Global.cs b/BizHawk.Client.Common/Global.cs
index a7bf184556..2a9f4081c0 100644
--- a/BizHawk.Client.Common/Global.cs
+++ b/BizHawk.Client.Common/Global.cs
@@ -14,7 +14,7 @@ namespace BizHawk.Client.Common
public static FirmwareManager FirmwareManager;
public static Rewinder Rewinder;
- public static MovieSession MovieSession = new MovieSession();
+ public static IMovieSession MovieSession = new MovieSession();
///
/// Used to disable secondary throttling (e.g. vsync, audio) for unthrottled modes or when the primary (clock) throttle is taking over (e.g. during fast forward/rewind).
diff --git a/BizHawk.Client.Common/movie/MovieSession.cs b/BizHawk.Client.Common/movie/MovieSession.cs
index 98cf347451..14e7a1999a 100644
--- a/BizHawk.Client.Common/movie/MovieSession.cs
+++ b/BizHawk.Client.Common/movie/MovieSession.cs
@@ -13,7 +13,7 @@ namespace BizHawk.Client.Common
{
public enum MovieEndAction { Stop, Pause, Record, Finish }
- public class MovieSession
+ public class MovieSession : IMovieSession
{
public MovieSession()
{
@@ -437,8 +437,8 @@ namespace BizHawk.Client.Common
// The behavior here is to only temporarily override these settings when playing a movie and then restore the user's preferred settings
// A more elegant approach would be appreciated
- public bool? PreviousNES_InQuickNES = null;
- public bool? PreviousSNES_InSnes9x = null;
+ public bool? PreviousNES_InQuickNES { get; set; }
+ public bool? PreviousSNES_InSnes9x { get; set; }
public void QueueNewMovie(IMovie movie, bool record, IEmulator emulator)
{
diff --git a/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs b/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs
new file mode 100644
index 0000000000..63bfe8cbeb
--- /dev/null
+++ b/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs
@@ -0,0 +1,40 @@
+using System.IO;
+using BizHawk.Emulation.Common;
+
+namespace BizHawk.Client.Common
+{
+ public interface IMovieSession
+ {
+ IMovie Movie { get; set; }
+ IMovie QueuedMovie { get; }
+ IMovieController MovieControllerAdapter { get; }
+ IMovieController MovieControllerInstance();
+ MultitrackRecorder MultiTrack { get; }
+
+ IController PreviousFrame { get; }
+ IController CurrentInput { get; }
+
+ bool ReadOnly { get; set; }
+ bool MovieIsQueued { get; }
+
+ bool? PreviousNES_InQuickNES { get; set; }
+ bool? PreviousSNES_InSnes9x { get; set; }
+
+ void HandleMovieOnFrameLoop();
+ void HandleMovieSaveState(TextWriter writer);
+ bool HandleMovieLoadState(string path);
+
+ // To function as a MovieSession, you must have hacky LoadState steps, non-hacky steps just won't do
+ bool HandleMovieLoadState_HackyStep1(TextReader reader);
+ bool HandleMovieLoadState_HackyStep2(TextReader reader);
+
+ ILogEntryGenerator LogGeneratorInstance();
+
+ void QueueNewMovie(IMovie movie, bool record, IEmulator emulator);
+ void RunQueuedMovie(bool recordMode);
+
+ void ToggleMultitrack();
+
+ void StopMovie(bool saveChanges = true);
+ }
+}