mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
GUI: Fix maximum page number calculation in grid chooser.
This avoids a off by one error in some cases.
This commit is contained in:
parent
bc1743b225
commit
40fb004509
@ -882,7 +882,7 @@ void SaveLoadChooserGrid::updateSaves() {
|
||||
}
|
||||
}
|
||||
|
||||
const uint numPages = (_entriesPerPage != 0) ? (_saveList.size() / _entriesPerPage + 1) : 1;
|
||||
const uint numPages = (_entriesPerPage != 0 && !_saveList.empty()) ? ((_saveList.size() + _entriesPerPage - 1) / _entriesPerPage) : 1;
|
||||
_pageDisplay->setLabel(Common::String::format("%u/%u", _curPage + 1, numPages));
|
||||
|
||||
if (_curPage > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user