mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-25 02:32:41 +03:00
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 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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user