diff options
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 5f700aac83..42930f0ff6 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -2311,7 +2311,7 @@ static int read_pfraw(char* filename, int prio) | |||
2311 | 2311 | ||
2312 | if (hid < 0) { | 2312 | if (hid < 0) { |
2313 | rb->close( fh ); | 2313 | rb->close( fh ); |
2314 | return 0; | 2314 | return -1; |
2315 | } | 2315 | } |
2316 | 2316 | ||
2317 | rb->yield(); /* allow audio to play when fast scrolling */ | 2317 | rb->yield(); /* allow audio to play when fast scrolling */ |
@@ -2347,7 +2347,7 @@ static inline bool load_and_prepare_surface(const int slide_index, | |||
2347 | hash_album, hash_artist); | 2347 | hash_album, hash_artist); |
2348 | 2348 | ||
2349 | int hid = read_pfraw(pfraw_file, prio); | 2349 | int hid = read_pfraw(pfraw_file, prio); |
2350 | if (!hid) | 2350 | if (hid < 0) |
2351 | return false; | 2351 | return false; |
2352 | 2352 | ||
2353 | pf_sldcache.cache[cache_index].hid = hid; | 2353 | pf_sldcache.cache[cache_index].hid = hid; |
@@ -3589,9 +3589,10 @@ static int pictureflow_main(void) | |||
3589 | 3589 | ||
3590 | pf_idx.buf_sz -= aa_bufsz; | 3590 | pf_idx.buf_sz -= aa_bufsz; |
3591 | ALIGN_BUFFER(pf_idx.buf, pf_idx.buf_sz, 4); | 3591 | ALIGN_BUFFER(pf_idx.buf, pf_idx.buf_sz, 4); |
3592 | aa_cache.buf = (char*) pf_idx.buf + aa_bufsz; | 3592 | aa_cache.buf = (char*) pf_idx.buf; |
3593 | aa_cache.buf_sz = aa_bufsz; | 3593 | aa_cache.buf_sz = aa_bufsz; |
3594 | ALIGN_BUFFER(aa_cache.buf, aa_cache.buf_sz, 4); | 3594 | pf_idx.buf += aa_bufsz; |
3595 | ALIGN_BUFFER(pf_idx.buf, pf_idx.buf_sz, 4); | ||
3595 | 3596 | ||
3596 | if (!create_empty_slide(pf_cfg.cache_version != CACHE_VERSION)) { | 3597 | if (!create_empty_slide(pf_cfg.cache_version != CACHE_VERSION)) { |
3597 | config_save(CACHE_REBUILD); | 3598 | config_save(CACHE_REBUILD); |
@@ -3613,7 +3614,7 @@ static int pictureflow_main(void) | |||
3613 | 3614 | ||
3614 | rb->buflib_init(&buf_ctx, (void *)pf_idx.buf, pf_idx.buf_sz); | 3615 | rb->buflib_init(&buf_ctx, (void *)pf_idx.buf, pf_idx.buf_sz); |
3615 | 3616 | ||
3616 | if (!(empty_slide_hid = read_pfraw(EMPTY_SLIDE, 0))) | 3617 | if ((empty_slide_hid = read_pfraw(EMPTY_SLIDE, 0)) < 0) |
3617 | { | 3618 | { |
3618 | error_wait("Unable to load empty slide image"); | 3619 | error_wait("Unable to load empty slide image"); |
3619 | return PLUGIN_ERROR; | 3620 | return PLUGIN_ERROR; |