tastudio: use LatchSticky() when adding new frames

fixes autohold behavior, making it operate like it did before banning user input latch in replay mode
now in replay mode all input is ignored except for autohold, which is set via tastudio gui
This commit is contained in:
feos 2017-03-12 17:28:54 +03:00
parent a30b89039f
commit 64665f0e82
4 changed files with 30 additions and 2 deletions

View File

@ -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)
{

View File

@ -143,6 +143,17 @@ namespace BizHawk.Client.Common
}
}
/// <summary>
/// latches sticky buttons from Global.AutofireStickyXORAdapter
/// </summary>
public void LatchSticky()
{
foreach (var button in Definition.BoolButtons)
{
MyBoolButtons[button] = Global.AutofireStickyXORAdapter.IsSticky(button);
}
}
/// <summary>
/// latches all buttons from the supplied mnemonic string
/// </summary>

View File

@ -64,6 +64,17 @@ namespace BizHawk.Client.Common
}
}
/// <summary>
/// latches sticky buttons from Global.AutofireStickyXORAdapter
/// </summary>
public void LatchSticky()
{
foreach (var button in Definition.BoolButtons)
{
MyBoolButtons[button] = Global.AutofireStickyXORAdapter.IsSticky(button);
}
}
/// <summary>
/// latches all buttons from the supplied mnemonic string
/// </summary>

View File

@ -10,6 +10,8 @@ namespace BizHawk.Client.Common
void LatchFromSource(IController source);
void LatchSticky();
void SetControllersAsMnemonic(string mnemonic);
}
}