Fix bugs in last commit
This commit is contained in:
parent
f7460d1821
commit
7f18d9ebc0
|
@ -8,9 +8,9 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
public void RemoveFrom(int frame)
|
||||
{
|
||||
if (frame > 0 && frame < this.Count)
|
||||
if (frame > 0 && frame <= this.Count)
|
||||
{
|
||||
this.RemoveRange(frame - 1, this.Count - frame);
|
||||
this.RemoveRange(frame - 1, this.Count - (frame - 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -287,14 +287,16 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public override IController GetInputState(int frame)
|
||||
{
|
||||
// TODO: states and lag capture
|
||||
if (Global.Emulator.Frame - 1 == frame)
|
||||
{
|
||||
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 (Global.Emulator.Frame == frame) // Take this opportunity to capture lag and state info if we do not have it
|
||||
{
|
||||
// TODO
|
||||
//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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue