From ed4ccdbfc60323f23c03fe0ae025073095213876 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 5 Sep 2015 15:27:59 -0400 Subject: [PATCH] InputRoll - don't call LastVisibleIndex, a calculated field, in a for loop, seems to be a nice speedup --- BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs index be0f02600f..2808cb6527 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs @@ -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