Input Roll - tweak how visible rows are calculated

This commit is contained in:
adelikat 2014-09-17 23:31:59 +00:00
parent 72842619ed
commit d1d414d10e
1 changed files with 7 additions and 2 deletions

View File

@ -463,9 +463,14 @@ namespace BizHawk.Client.EmuHawk
{
if (HorizontalOrientation)
{
return (int)Math.Ceiling((Decimal)(DrawWidth - ColumnWidth) / CellWidth);
var width = DrawWidth - (NeedsVScrollbar ? VBar.Width : 0);
return (int)Math.Floor((decimal)(width - ColumnWidth) / CellWidth);
}
return (int)Math.Ceiling((Decimal)DrawHeight / CellHeight) - 1;
var height = DrawHeight - (NeedsHScrollbar ? HBar.Height : 0);
return (int)((decimal)height / CellHeight);
}
}