From 5bf0ed6000238f2f1143ee62f11303546bd7620e Mon Sep 17 00:00:00 2001 From: Maschell Date: Mon, 19 Sep 2022 17:52:46 +0200 Subject: [PATCH] Fix displaying the maximum page number, reduce the number displayed items to 12 --- src/modpackSelector.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modpackSelector.cpp b/src/modpackSelector.cpp index 2cefa27..6b08936 100644 --- a/src/modpackSelector.cpp +++ b/src/modpackSelector.cpp @@ -48,7 +48,6 @@ void HandleMultiModPacks(uint64_t titleID) { return; } - int selected = 0; int initScreen = 1; int x_offset = -2; @@ -92,8 +91,8 @@ void HandleMultiModPacks(uint64_t titleID) { int wantToExit = 0; int page = 0; - int per_page = displayAutoSkipOption ? 11 : 13; - int max_pages = (modTitlePath.size() / per_page) + 1; + int per_page = displayAutoSkipOption ? 11 : 12; + int max_pages = (modTitlePath.size() / per_page) + (modTitlePath.size() % per_page != 0 ? 1 : 0); int curState = 0; if (gAutoApplySingleModpack && modTitlePath.size() == 1) {