TasMovie - rip out input caching attempt that wasn't even working

This commit is contained in:
adelikat 2019-12-07 12:01:56 -06:00
parent cc9ff8022c
commit 6107bc4553
2 changed files with 0 additions and 23 deletions

View File

@ -13,7 +13,6 @@ namespace BizHawk.Client.Common
public sealed partial class TasMovie : Bk2Movie, INotifyPropertyChanged
{
private readonly Bk2MnemonicConstants _mnemonics = new Bk2MnemonicConstants();
private readonly Dictionary<int, IController> _inputStateCache = new Dictionary<int, IController>();
public IStringLog VerificationLog { get; } = StringLogUtil.MakeStringLog(); // For movies that do not begin with power-on, this is the input required to get into the initial state
public TasBranchCollection Branches { get; } = new TasBranchCollection();
@ -26,7 +25,6 @@ namespace BizHawk.Client.Common
public bool LastPositionStable { get; set; } = true;
public TasMovieMarkerList Markers { get; private set; }
public bool BindMarkersToInput { get; set; }
public bool UseInputCache { get; set; }
public int CurrentBranch { get; set; }
public TasLagLog TasLagLog { get; } = new TasLagLog();
@ -148,26 +146,10 @@ namespace BizHawk.Client.Common
/// </summary>
public string DisplayValue(int frame, string buttonName)
{
if (UseInputCache && _inputStateCache.ContainsKey(frame))
{
return CreateDisplayValueForButton(_inputStateCache[frame], buttonName);
}
var adapter = GetInputState(frame);
if (UseInputCache)
{
_inputStateCache.Add(frame, adapter);
}
return CreateDisplayValueForButton(adapter, buttonName);
}
public void FlushInputCache()
{
_inputStateCache.Clear();
}
private string CreateDisplayValueForButton(IController adapter, string buttonName)
{
if (adapter.Definition.BoolButtons.Contains(buttonName))

View File

@ -814,12 +814,7 @@ namespace BizHawk.Client.EmuHawk
private void RefreshTasView()
{
CurrentTasMovie.UseInputCache = true;
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
CurrentTasMovie.FlushInputCache();
CurrentTasMovie.UseInputCache = false;
_lastRefresh = Emulator.Frame;
}