mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-11 03:34:13 +00:00
NEVERHOOD: Fix save slot selection
My initial suggestion to fix the issue was made in163023a
, which broke the save slot selection logic. The actual save slot selection problem was fixed in commit2ca36ab
This commit is contained in:
parent
42e3c18ed3
commit
b60b3bbecd
@ -766,9 +766,7 @@ void SavegameListBox::onClick() {
|
||||
mousePos.y -= _y + _rect.y1;
|
||||
if (mousePos.x >= 0 && mousePos.x <= _rect.x2 - _rect.x1 &&
|
||||
mousePos.y >= 0 && mousePos.y <= _rect.y2 - _rect.y1) {
|
||||
// We add 1 to the char height to ensure that the correct entry is chosen if the
|
||||
// user clicks at the bottom the text entry
|
||||
int newIndex = _firstVisibleItem + mousePos.y / (_fontSurface->getCharHeight() + 1);
|
||||
int newIndex = _firstVisibleItem + mousePos.y / _fontSurface->getCharHeight();
|
||||
if (newIndex <= _lastVisibleItem) {
|
||||
_currIndex = newIndex;
|
||||
refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user