pass sticky adapter into MovieSession
This commit is contained in:
parent
c4c820fad3
commit
71cb4fbdb0
|
@ -69,6 +69,7 @@ namespace BizHawk.Client.Common
|
|||
AutofireStickyXorAdapter.Source = StickyXorAdapter;
|
||||
|
||||
session.MovieIn.Source = AutofireStickyXorAdapter;
|
||||
session.StickySource = AutofireStickyXorAdapter;
|
||||
ControllerOutput.Source = session.MovieOut;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public IInputAdapter MovieIn { get; } = new CopyControllerAdapter();
|
||||
public IInputAdapter MovieOut { get; } = new CopyControllerAdapter();
|
||||
public IStickyController StickySource { get; set; }
|
||||
|
||||
public IMovieController MovieController { get; private set; } = new Bk2Controller("", NullController.Instance.Definition);
|
||||
|
||||
|
@ -435,8 +436,7 @@ namespace BizHawk.Client.Common
|
|||
// we don't want TasMovie to latch user input outside its internal recording mode, so limit it to autohold
|
||||
if (Movie is ITasMovie && Movie.IsPlayingOrFinished())
|
||||
{
|
||||
// TODO: same as MovieIn, since autofiresitcky is the last in the chain before movie
|
||||
MovieController.SetFromSticky(Global.InputManager.AutofireStickyXorAdapter);
|
||||
MovieController.SetFromSticky(StickySource);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -23,6 +23,11 @@ namespace BizHawk.Client.Common
|
|||
IMovieController MovieController { get; }
|
||||
MultitrackRecorder MultiTrack { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a source for sticky controls ot use when recording
|
||||
/// </summary>
|
||||
IStickyController StickySource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents the input source that is fed to
|
||||
/// the movie for the purpsoe of recording, if active,
|
||||
|
|
|
@ -275,8 +275,7 @@ namespace BizHawk.Client.Common
|
|||
int oldLength = InputLogLength;
|
||||
ChangeLog.AddGeneralUndo(oldLength, oldLength + numFrames - 1);
|
||||
|
||||
// TODO: same as MovieIn, since autofiresitcky is the last in the chain before movie
|
||||
Session.MovieController.SetFromSticky(Global.InputManager.AutofireStickyXorAdapter);
|
||||
Session.MovieController.SetFromSticky(Session.StickySource);
|
||||
|
||||
// account for autohold. needs autohold pattern to be already recorded in the current frame
|
||||
var lg = LogGeneratorInstance(Session.MovieController);
|
||||
|
|
Loading…
Reference in New Issue