Tastudio - fix capturing during the movie playback frame loop, used some duct tape for now, need a better solution

This commit is contained in:
adelikat 2015-02-24 21:56:01 +00:00
parent 8af99c9066
commit 240b89082b
2 changed files with 16 additions and 0 deletions

View File

@ -135,6 +135,12 @@ namespace BizHawk.Client.Common
public void LatchInputFromLog()
{
var input = Movie.GetInputState(Global.Emulator.Frame);
if (Movie is TasMovie) // Hack city, GetInputState can't run this code because all sorts of places call it, we only want to do this during this playback loop
{
(Movie as TasMovie).GreenzoneCurrentFrame();
}
MovieControllerAdapter.LatchFromSource(input);
if (MultiTrack.IsActive)
{

View File

@ -307,6 +307,16 @@ namespace BizHawk.Client.Common
return base.GetInputState(frame);
}
public void GreenzoneCurrentFrame()
{
LagLog[Global.Emulator.Frame] = Global.Emulator.AsInputPollable().IsLagFrame;
if (!StateManager.HasState(Global.Emulator.Frame))
{
StateManager.Capture();
}
}
public void ClearLagLog()
{
LagLog.Clear();