TAStudio - populate greenzone during playback

This commit is contained in:
adelikat 2014-07-10 20:48:43 +00:00
parent f0425f3cc5
commit f3af2821bb
3 changed files with 16 additions and 1 deletions

View File

@ -96,7 +96,7 @@ namespace BizHawk.Client.Common
}
}
public string GetInput(int frame)
public virtual string GetInput(int frame)
{
if (frame < FrameCount && frame >= 0)
{

View File

@ -123,5 +123,15 @@ namespace BizHawk.Client.Common
var adapter = GetInputState(frame) as Bk2ControllerAdapter;
return adapter.IsPressed(buttonName);
}
public override string GetInput(int frame)
{
if (Global.Emulator.Frame == frame && !StateManager.HasState(frame))
{
StateManager.Capture();
}
return base.GetInput(frame);
}
}
}

View File

@ -47,6 +47,11 @@ namespace BizHawk.Client.Common
}
}
public bool HasState(int frame)
{
return States.ContainsKey(frame);
}
/// <summary>
/// Clears out all savestates after the given frame number
/// </summary>