InputRoll - only invalidate the necessary rectangle size

This commit is contained in:
adelikat 2019-12-06 20:27:15 -06:00
parent bb5267d042
commit ae239a0b1d
1 changed files with 18 additions and 1 deletions

View File

@ -271,7 +271,24 @@ namespace BizHawk.Client.EmuHawk
// Similarly to ListView in virtual mode, we want to always refresh
// when setting row count, that gives the calling code assurance that
// redraw will happen
Refresh();
// TODO: horizontal orientation
if (HorizontalOrientation)
{
Refresh();
}
else
{
int x = _hBar.Value;
int y = ColumnHeight;
int w = VisibleColumns.Any()
? Math.Min(VisibleColumns.Max(c => c.Right) - _hBar.Value, Width)
: 0;
int h = Height - y;
Invalidate(new Rectangle(x, y, w, h));
}
}
}