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/WatchFaceCasioStyleG7710.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/WatchFaceCasioStyleG7710.cpp')
-rw-r--r-- | src/displayapp/screens/WatchFaceCasioStyleG7710.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp b/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp index f9a01abd..525c2eeb 100644 --- a/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp +++ b/src/displayapp/screens/WatchFaceCasioStyleG7710.cpp @@ -333,3 +333,20 @@ void WatchFaceCasioStyleG7710::Refresh() { lv_obj_realign(stepIcon); } } +bool WatchFaceCasioStyleG7710::IsAvailable(Pinetime::Controllers::FS& filesystem) { + lfs_file file = {}; + + if (filesystem.FileOpen(&file, "/fonts/lv_font_dots_40.bin", LFS_O_RDONLY) < 0) { + return false; + } + + if (filesystem.FileOpen(&file, "/fonts/7segments_40.bin", LFS_O_RDONLY) < 0) { + return false; + } + + if (filesystem.FileOpen(&file, "/fonts/7segments_115.bin", LFS_O_RDONLY) < 0) { + return false; + } + + return true; +} |