Allow zero app to be selected at build time

Fix 'nScreens' calculation in ApplicationList so that we can build the project with zero user app selected.
main
Jean-François Milants 2023-12-10 18:12:40 +07:00 committed by JF
parent 80607282dd
commit d79766bccd
1 changed files with 1 additions and 1 deletions

@ -38,7 +38,7 @@ namespace Pinetime {
static constexpr int appsPerScreen = 6; static constexpr int appsPerScreen = 6;
static constexpr int nScreens = (UserAppTypes::Count - 1) / appsPerScreen + 1; static constexpr int nScreens = UserAppTypes::Count > 0 ? (UserAppTypes::Count - 1) / appsPerScreen + 1 : 1;
ScreenList<nScreens> screens; ScreenList<nScreens> screens;
}; };