Fix displaying the maximum page number, reduce the number displayed items to 12

This commit is contained in:
Maschell 2022-09-19 17:52:46 +02:00
parent 998f5a3219
commit 5bf0ed6000

View File

@ -48,7 +48,6 @@ void HandleMultiModPacks(uint64_t titleID) {
return; return;
} }
int selected = 0; int selected = 0;
int initScreen = 1; int initScreen = 1;
int x_offset = -2; int x_offset = -2;
@ -92,8 +91,8 @@ void HandleMultiModPacks(uint64_t titleID) {
int wantToExit = 0; int wantToExit = 0;
int page = 0; int page = 0;
int per_page = displayAutoSkipOption ? 11 : 13; int per_page = displayAutoSkipOption ? 11 : 12;
int max_pages = (modTitlePath.size() / per_page) + 1; int max_pages = (modTitlePath.size() / per_page) + (modTitlePath.size() % per_page != 0 ? 1 : 0);
int curState = 0; int curState = 0;
if (gAutoApplySingleModpack && modTitlePath.size() == 1) { if (gAutoApplySingleModpack && modTitlePath.size() == 1) {