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.
This commit is contained in:
Jean-François Milants authored and JF committed 2023-12-10 18:16:41 +01:00
1 parent 80607282dd
commit d79766bccd
1 file changed
+1 -1
+1 -1
View File
@@ -38,7 +38,7 @@ namespace Pinetime {
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;
};