summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-01-13 17:10:07 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-01-13 17:10:07 +0000
commitde4f8c9f64c86aacc8ba2f5228e58894d1edb674 (patch)
treeb2bf97981454c0ab5eeaad98a31d6d8dcda6c48e /apps/plugins
parent09484db74053b9a3618d6e5bdedcc1cf4c582b3b (diff)
downloadrockbox-de4f8c9f64c86aacc8ba2f5228e58894d1edb674.zip
rockbox-de4f8c9f64c86aacc8ba2f5228e58894d1edb674.tar.gz
rockbox-de4f8c9f64c86aacc8ba2f5228e58894d1edb674.tar.bz2
rockbox-de4f8c9f64c86aacc8ba2f5228e58894d1edb674.tar.xz
use plugin buffer for greylib overlay in test_greylib_bitmap_scale
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19765 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/test_greylib_bitmap_scale.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/test_greylib_bitmap_scale.c b/apps/plugins/test_greylib_bitmap_scale.c
index 1e45130..34d3cf2 100644
--- a/apps/plugins/test_greylib_bitmap_scale.c
+++ b/apps/plugins/test_greylib_bitmap_scale.c
@@ -34,7 +34,6 @@ PLUGIN_HEADER
GREY_INFO_STRUCT
static unsigned char grey_bm_buf[LCD_WIDTH * LCD_HEIGHT +
BM_SCALED_SIZE(LCD_WIDTH,0,FORMAT_NATIVE,0)];
-static unsigned char grey_display_buf[2*LCD_WIDTH * LCD_HEIGHT];
static const struct plugin_api* rb; /* global api struct pointer */
@@ -43,6 +42,8 @@ MEM_FUNCTION_WRAPPERS(rb)
/* this is the plugin entry point */
enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
{
+ void * plugin_buf;
+ size_t plugin_buf_len;
static char filename[MAX_PATH];
struct bitmap grey_bm = {
.width = LCD_WIDTH,
@@ -72,9 +73,9 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
return PLUGIN_ERROR;
}
- long buf_taken;
- if(!grey_init(rb, &grey_display_buf[0], sizeof(grey_display_buf), 0,
- LCD_WIDTH, LCD_HEIGHT, &buf_taken))
+ plugin_buf = rb->plugin_get_buffer(&plugin_buf_len);
+ if(!grey_init(rb, plugin_buf, plugin_buf_len, 0, LCD_WIDTH, LCD_HEIGHT,
+ NULL))
{
rb->splash(HZ*2,"grey init failed");
return PLUGIN_ERROR;