From 41a4813c8bd9770013f30d5a31fcc3384e4cd3ab Mon Sep 17 00:00:00 2001 From: mark9064 <30447455+mark9064@users.noreply.github.com> Date: Mon, 27 Nov 2023 01:22:19 +0000 Subject: [PATCH] Fix calculation of number of app screens --- src/displayapp/screens/ApplicationList.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h index f8a6be66..b3a477ae 100644 --- a/src/displayapp/screens/ApplicationList.h +++ b/src/displayapp/screens/ApplicationList.h @@ -38,8 +38,7 @@ namespace Pinetime { static constexpr int appsPerScreen = 6; - // Increment this when more space is needed - static constexpr int nScreens = (UserAppTypes::Count / appsPerScreen) + 1; + static constexpr int nScreens = CEIL_DIV(UserAppTypes::Count, appsPerScreen); ScreenList screens; };