[FL-2748] disabled automatic poweroff for single-frame slideshows #1621

This commit is contained in:
hedger
2022-08-18 19:46:43 +03:00
committed by GitHub
parent e243a0e0e4
commit 2e993b0a58
3 changed files with 14 additions and 5 deletions

View File

@@ -94,6 +94,10 @@ bool slideshow_is_loaded(Slideshow* slideshow) {
return slideshow->loaded;
}
bool slideshow_is_one_page(Slideshow* slideshow) {
return slideshow->loaded && (slideshow->icon.frame_count == 1);
}
bool slideshow_advance(Slideshow* slideshow) {
uint8_t next_frame = slideshow->current_frame + 1;
if(next_frame < slideshow->icon.frame_count) {