diff options
| author | Jean-François Milants <jf@codingfield.com> | 2023-12-10 18:12:40 +0100 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2023-12-10 18:16:41 +0100 |
| commit | d79766bccd81b8b1ccc7f71b5aad9de3fc436193 (patch) | |
| tree | bff1a1cb4865e73101eb1d5edf0ec0bc778d1527 /src/displayapp | |
| parent | 80607282dd78a0bc3a9cc234d992edec712637c1 (diff) | |
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.
Diffstat (limited to 'src/displayapp')
| -rw-r--r-- | src/displayapp/screens/ApplicationList.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/displayapp/screens/ApplicationList.h b/src/displayapp/screens/ApplicationList.h index 77e1d39e..978f0287 100644 --- a/src/displayapp/screens/ApplicationList.h +++ b/src/displayapp/screens/ApplicationList.h @@ -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; }; |
