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:
parent
80607282dd
commit
d79766bccd
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user