diff --git a/BizHawk.Client.Common/movie/MovieSession.cs b/BizHawk.Client.Common/movie/MovieSession.cs index 153fe99738..08181f14d7 100644 --- a/BizHawk.Client.Common/movie/MovieSession.cs +++ b/BizHawk.Client.Common/movie/MovieSession.cs @@ -294,8 +294,12 @@ namespace BizHawk.Client.Common private void HandleFrameLoopForRecordMode() { - // tasmovie is appended via recording frames, but we don't want it to latch input outside its internal recording mode - if (!(Movie is TasMovie) || !Movie.IsPlaying) + // we don't want tasmovie to latch user input outside its internal recording mode, so limit it to autohold + if (Movie is TasMovie && Movie.IsPlaying) + { + MovieControllerAdapter.LatchSticky(); + } + else { if (MultiTrack.IsActive) { diff --git a/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs b/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs index 5c8f80df7c..61a73f0221 100644 --- a/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs +++ b/BizHawk.Client.Common/movie/bk2/Bk2ControllerAdapter.cs @@ -143,6 +143,17 @@ namespace BizHawk.Client.Common } } + /// + /// latches sticky buttons from Global.AutofireStickyXORAdapter + /// + public void LatchSticky() + { + foreach (var button in Definition.BoolButtons) + { + MyBoolButtons[button] = Global.AutofireStickyXORAdapter.IsSticky(button); + } + } + /// /// latches all buttons from the supplied mnemonic string /// diff --git a/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs b/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs index 60328dc448..38527cb516 100644 --- a/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs +++ b/BizHawk.Client.Common/movie/bkm/BkmControllerAdapter.cs @@ -64,6 +64,17 @@ namespace BizHawk.Client.Common } } + /// + /// latches sticky buttons from Global.AutofireStickyXORAdapter + /// + public void LatchSticky() + { + foreach (var button in Definition.BoolButtons) + { + MyBoolButtons[button] = Global.AutofireStickyXORAdapter.IsSticky(button); + } + } + /// /// latches all buttons from the supplied mnemonic string /// diff --git a/BizHawk.Client.Common/movie/interfaces/IMovieController.cs b/BizHawk.Client.Common/movie/interfaces/IMovieController.cs index ac1569ee9f..efaa2f45cb 100644 --- a/BizHawk.Client.Common/movie/interfaces/IMovieController.cs +++ b/BizHawk.Client.Common/movie/interfaces/IMovieController.cs @@ -10,6 +10,8 @@ namespace BizHawk.Client.Common void LatchFromSource(IController source); + void LatchSticky(); + void SetControllersAsMnemonic(string mnemonic); } }