Watch face settings : disable watch faces that are not available (external resources are not installed).

This commit is contained in:
Jean-François Milants
2022-10-11 21:36:31 +02:00
parent 8c7be1fbb1
commit eb0af22ecf
9 changed files with 72 additions and 11 deletions

View File

@@ -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;
}