[FL-2748] disabled automatic poweroff for single-frame slideshows #1621
This commit is contained in:
@@ -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) {
|
||||
|
@@ -9,6 +9,7 @@ Slideshow* slideshow_alloc();
|
||||
void slideshow_free(Slideshow* slideshow);
|
||||
bool slideshow_load(Slideshow* slideshow, const char* fspath);
|
||||
bool slideshow_is_loaded(Slideshow* slideshow);
|
||||
bool slideshow_is_one_page(Slideshow* slideshow);
|
||||
void slideshow_goback(Slideshow* slideshow);
|
||||
bool slideshow_advance(Slideshow* slideshow);
|
||||
void slideshow_draw(Slideshow* slideshow, Canvas* canvas, uint8_t x, uint8_t y);
|
||||
|
Reference in New Issue
Block a user