InputRoll - don't call LastVisibleIndex, a calculated field, in a for loop, seems to be a nice speedup

This commit is contained in:
adelikat 2015-09-05 15:27:59 -04:00
parent e9d7c7c88c
commit ed4ccdbfc6
1 changed files with 2 additions and 1 deletions

View File

@ -452,10 +452,11 @@ namespace BizHawk.Client.EmuHawk
{
// SuuperW: This allows user to see other colors in selected frames.
Color rowColor = Color.White;
int _lastVisibleRow = LastVisibleRow;
int lastRow = -1;
foreach (Cell cell in SelectedItems)
{
if (cell.RowIndex > LastVisibleRow || cell.RowIndex < FirstVisibleRow)
if (cell.RowIndex > _lastVisibleRow || cell.RowIndex < FirstVisibleRow)
continue;
Cell relativeCell = new Cell