diff options
| author | Jean-François Milants <jf@codingfield.com> | 2022-10-11 21:36:31 +0200 |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2022-10-11 21:36:31 +0200 |
| commit | eb0af22ecf66957b9341521990c49a6d1d5d70e3 (patch) | |
| tree | 269d1925185cd8d10cd39eb86f23c1170e40548e /src/displayapp/screens/WatchFaceInfineat.cpp | |
| parent | 8c7be1fbb1d172ffc5cf99ec2b013f11f35dc421 (diff) | |
Watch face settings : disable watch faces that are not available (external resources are not installed).
Diffstat (limited to 'src/displayapp/screens/WatchFaceInfineat.cpp')
| -rw-r--r-- | src/displayapp/screens/WatchFaceInfineat.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/displayapp/screens/WatchFaceInfineat.cpp b/src/displayapp/screens/WatchFaceInfineat.cpp index 5822a1e8..01b425da 100644 --- a/src/displayapp/screens/WatchFaceInfineat.cpp +++ b/src/displayapp/screens/WatchFaceInfineat.cpp @@ -609,3 +609,21 @@ void WatchFaceInfineat::ToggleBatteryIndicatorColor(bool showSideCover) { lv_color_hex(infineatColors.orange[settingsController.GetInfineatColorIndex() * nLines + 7])); } } + +bool WatchFaceInfineat::IsAvailable(Pinetime::Controllers::FS& filesystem) { + lfs_file file = {}; + + if (filesystem.FileOpen(&file, "/fonts/teko.bin", LFS_O_RDONLY) < 0) { + return false; + } + + if (filesystem.FileOpen(&file, "/fonts/bebas.bin", LFS_O_RDONLY) < 0) { + return false; + } + + if (filesystem.FileOpen(&file, "/images/pine_small.bin", LFS_O_RDONLY) < 0) { + return false; + } + + return true; +} |
