make TasMovie Emulator null check a bit clearer as to what is going on

This commit is contained in:
adelikat 2020-07-14 17:47:22 -05:00
parent 7040eca741
commit 219b33732c
2 changed files with 4 additions and 5 deletions

View File

@ -27,6 +27,8 @@ namespace BizHawk.Client.Common
Emulator = emulator;
}
protected bool IsAttached() => Emulator != null;
public IEmulator Emulator { get; private set; }
public IMovieSession Session { get; }

View File

@ -81,12 +81,9 @@ namespace BizHawk.Client.Common
var lagged = LagLog[lagIndex];
if (lagged == null)
{
if (Emulator != null)
if (IsAttached() && Emulator.Frame == lagIndex)
{
if (Emulator.Frame == lagIndex)
{
lagged = _inputPollable.IsLagFrame;
}
lagged = _inputPollable.IsLagFrame;
}
}