Update to 1.9.2

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2019-07-09 19:35:53 +03:00
parent c4ba943743
commit 383c7fcc21
84 changed files with 408 additions and 318 deletions

View File

@@ -2414,7 +2414,7 @@ static void HandleScrollbarScrolling(Window *w)
}
/* Find the item we want to move to and make sure it's inside bounds. */
int pos = min(max(0, i + _scrollbar_start_pos) * sb->GetCount() / _scrollbar_size, max(0, sb->GetCount() - sb->GetCapacity()));
int pos = min(RoundDivSU(max(0, i + _scrollbar_start_pos) * sb->GetCount(), _scrollbar_size), max(0, sb->GetCount() - sb->GetCapacity()));
if (rtl) pos = max(0, sb->GetCount() - sb->GetCapacity() - pos);
if (pos != sb->GetPosition()) {
sb->SetPosition(pos);