Improve tastudio refresh behavior in tastudiolualibrary
should resolve #3969. Let's hope this doesn't break anything. There still seems to be some overhead, but I can't profile this so I can't say whether it's from submitclearframes or applyinputchanges.
This commit is contained in:
parent
cee9661f0e
commit
5fd3575c0f
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
@ -327,6 +327,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Tastudio.CurrentTasMovie.SetAxisState(_changeList[i].Frame, _changeList[i].Button, _changeList[i].ValueAxis);
|
||||
break;
|
||||
}
|
||||
Tastudio.RefreshForInputChange(_changeList[i].Frame);
|
||||
break;
|
||||
case LuaChangeTypes.InsertFrames:
|
||||
Tastudio.InsertNumFrames(_changeList[i].Frame, _changeList[i].Number);
|
||||
|
@ -340,7 +341,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
_changeList.Clear();
|
||||
Tastudio.RefreshDialog();
|
||||
Tastudio.JumpToGreenzone();
|
||||
Tastudio.DoAutoRestore();
|
||||
}
|
||||
|
|
|
@ -886,6 +886,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
public void RefreshForInputChange(int firstChangedFrame)
|
||||
{
|
||||
if (TasView.IsPartiallyVisible(firstChangedFrame) || firstChangedFrame < TasView.FirstVisibleRow)
|
||||
{
|
||||
RefreshDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTasViewRowCount()
|
||||
{
|
||||
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
|
||||
|
@ -1061,7 +1069,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
RefreshDialog();
|
||||
RefreshForInputChange(insertionFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1082,7 +1090,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
RefreshDialog();
|
||||
RefreshForInputChange(beginningFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1105,7 +1113,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
RefreshDialog();
|
||||
RefreshForInputChange(beginningFrame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue