Tastudio - when emuhawk is playing back frames, we must be logging lag and savestates in tasmovie if we do not have the information! This fixes a number of "spooky" bugs I've been finding!
This commit is contained in:
parent
b8925d2635
commit
e58e911d7e
|
@ -114,7 +114,7 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public IController GetInputState(int frame)
|
||||
public virtual IController GetInputState(int frame)
|
||||
{
|
||||
if (frame < FrameCount && frame >= 0)
|
||||
{
|
||||
|
|
|
@ -256,6 +256,7 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
|
||||
// TODO: try not to need this, or at least use GetInputState and then a log entry generator
|
||||
// TODO: this is being called in Clone and probably other places, and that's bad, they are capturing the current frame for other frames!
|
||||
public string GetInputLogEntry(int frame)
|
||||
{
|
||||
if (Global.Emulator.Frame == frame && !StateManager.HasState(frame))
|
||||
|
@ -303,5 +304,24 @@ namespace BizHawk.Client.Common
|
|||
Changes = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override IController GetInputState(int frame)
|
||||
{
|
||||
// TODO: states and lag capture
|
||||
if (Global.Emulator.Frame == frame) // Take this opportunity to capture lag and state info if we do not have it
|
||||
{
|
||||
if (frame == LagLog.Count) // I intentionally did not do >=, if it were >= we missed some entries somewhere, oops, maybe this shoudl be a dictionary<int, bool> with frame values?
|
||||
{
|
||||
LagLog.Add(Global.Emulator.IsLagFrame);
|
||||
}
|
||||
|
||||
if (!StateManager.HasState(frame))
|
||||
{
|
||||
StateManager.Capture();
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetInputState(frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue