summaryrefslogtreecommitdiff
path: root/apps/plugins/pictureflow/pictureflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pictureflow/pictureflow.c')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index e93f2d2951..c13aca1a95 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -33,7 +33,6 @@
33#include "lib/grey.h" 33#include "lib/grey.h"
34#include "lib/mylcd.h" 34#include "lib/mylcd.h"
35#include "lib/feature_wrappers.h" 35#include "lib/feature_wrappers.h"
36#include "lib/buflib.h"
37 36
38 37
39 38
@@ -924,7 +923,7 @@ void create_track_index(const int slide_index)
924 int string_index = 0, track_num; 923 int string_index = 0, track_num;
925 int disc_num; 924 int disc_num;
926 size_t out = 0; 925 size_t out = 0;
927 track_names = (char *)buflib_buffer_out(&buf_ctx, &out); 926 track_names = rb->buflib_buffer_out(&buf_ctx, &out);
928 borrowed += out; 927 borrowed += out;
929 int avail = borrowed; 928 int avail = borrowed;
930 tracks = (struct track_data*)(track_names + borrowed); 929 tracks = (struct track_data*)(track_names + borrowed);
@@ -980,7 +979,7 @@ retry:
980 if (!free_slide_prio(0)) 979 if (!free_slide_prio(0))
981 goto fail; 980 goto fail;
982 out = 0; 981 out = 0;
983 buflib_buffer_out(&buf_ctx, &out); 982 rb->buflib_buffer_out(&buf_ctx, &out);
984 avail += out; 983 avail += out;
985 borrowed += out; 984 borrowed += out;
986 985
@@ -1457,7 +1456,7 @@ static inline void lla_insert_before(int *head, int i, int p)
1457static inline void free_slide(int i) 1456static inline void free_slide(int i)
1458{ 1457{
1459 if (cache[i].hid != empty_slide_hid) 1458 if (cache[i].hid != empty_slide_hid)
1460 buflib_free(&buf_ctx, cache[i].hid); 1459 rb->buflib_free(&buf_ctx, cache[i].hid);
1461 cache[i].index = -1; 1460 cache[i].index = -1;
1462 lla_pop_item(&cache_used, i); 1461 lla_pop_item(&cache_used, i);
1463 lla_insert_tail(&cache_free, i); 1462 lla_insert_tail(&cache_free, i);
@@ -1521,7 +1520,7 @@ int read_pfraw(char* filename, int prio)
1521 sizeof( pix_t ) * bmph.width * bmph.height; 1520 sizeof( pix_t ) * bmph.width * bmph.height;
1522 1521
1523 int hid; 1522 int hid;
1524 while (!(hid = buflib_alloc(&buf_ctx, size)) && free_slide_prio(prio)); 1523 while (!(hid = rb->buflib_alloc(&buf_ctx, size)) && free_slide_prio(prio));
1525 1524
1526 if (!hid) { 1525 if (!hid) {
1527 rb->close( fh ); 1526 rb->close( fh );
@@ -1529,7 +1528,7 @@ int read_pfraw(char* filename, int prio)
1529 } 1528 }
1530 1529
1531 rb->yield(); /* allow audio to play when fast scrolling */ 1530 rb->yield(); /* allow audio to play when fast scrolling */
1532 struct dim *bm = buflib_get_data(&buf_ctx, hid); 1531 struct dim *bm = rb->buflib_get_data(&buf_ctx, hid);
1533 1532
1534 bm->width = bmph.width; 1533 bm->width = bmph.width;
1535 bm->height = bmph.height; 1534 bm->height = bmph.height;
@@ -1694,7 +1693,7 @@ static inline struct dim *get_slide(const int hid)
1694 1693
1695 struct dim *bmp; 1694 struct dim *bmp;
1696 1695
1697 bmp = buflib_get_data(&buf_ctx, hid); 1696 bmp = rb->buflib_get_data(&buf_ctx, hid);
1698 1697
1699 return bmp; 1698 return bmp;
1700} 1699}
@@ -2697,7 +2696,7 @@ int main(void)
2697 configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION); 2696 configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION);
2698 } 2697 }
2699 2698
2700 buflib_init(&buf_ctx, (void *)buf, buf_size); 2699 rb->buflib_init(&buf_ctx, (void *)buf, buf_size);
2701 2700
2702 if (!(empty_slide_hid = read_pfraw(EMPTY_SLIDE, 0))) 2701 if (!(empty_slide_hid = read_pfraw(EMPTY_SLIDE, 0)))
2703 { 2702 {
@@ -2832,7 +2831,7 @@ int main(void)
2832 case PF_BACK: 2831 case PF_BACK:
2833 if ( pf_state == pf_show_tracks ) 2832 if ( pf_state == pf_show_tracks )
2834 { 2833 {
2835 buflib_buffer_in(&buf_ctx, borrowed); 2834 rb->buflib_buffer_in(&buf_ctx, borrowed);
2836 borrowed = 0; 2835 borrowed = 0;
2837 track_index = -1; 2836 track_index = -1;
2838 pf_state = pf_cover_out; 2837 pf_state = pf_cover_out;