diff options
Diffstat (limited to 'apps/plugins/greyscale.c')
-rw-r--r-- | apps/plugins/greyscale.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index cd8db5bf8b..2cd373ea9b 100644 --- a/apps/plugins/greyscale.c +++ b/apps/plugins/greyscale.c | |||
@@ -104,7 +104,6 @@ PLUGIN_HEADER | |||
104 | /******************************* Globals ***********************************/ | 104 | /******************************* Globals ***********************************/ |
105 | 105 | ||
106 | GREY_INFO_STRUCT | 106 | GREY_INFO_STRUCT |
107 | static const struct plugin_api* rb; /* global api struct pointer */ | ||
108 | static char pbuf[32]; /* global printf buffer */ | 107 | static char pbuf[32]; /* global printf buffer */ |
109 | static unsigned char *gbuf; | 108 | static unsigned char *gbuf; |
110 | static size_t gbuf_size = 0; | 109 | static size_t gbuf_size = 0; |
@@ -117,7 +116,7 @@ void cleanup(void *parameter) | |||
117 | 116 | ||
118 | grey_release(); /* switch off overlay and deinitialize */ | 117 | grey_release(); /* switch off overlay and deinitialize */ |
119 | /* Turn on backlight timeout (revert to settings) */ | 118 | /* Turn on backlight timeout (revert to settings) */ |
120 | backlight_use_settings(rb); /* backlight control in lib/helper.c */ | 119 | backlight_use_settings(); /* backlight control in lib/helper.c */ |
121 | } | 120 | } |
122 | 121 | ||
123 | /* this is only a demo of what the framework can do */ | 122 | /* this is only a demo of what the framework can do */ |
@@ -202,7 +201,7 @@ int main(void) | |||
202 | }; | 201 | }; |
203 | 202 | ||
204 | /* Turn off backlight timeout */ | 203 | /* Turn off backlight timeout */ |
205 | backlight_force_on(rb); /* backlight control in lib/helper.c */ | 204 | backlight_force_on(); /* backlight control in lib/helper.c */ |
206 | 205 | ||
207 | rb->lcd_setfont(FONT_SYSFIXED); /* select default font */ | 206 | rb->lcd_setfont(FONT_SYSFIXED); /* select default font */ |
208 | 207 | ||
@@ -212,7 +211,7 @@ int main(void) | |||
212 | /* initialize the greyscale buffer: | 211 | /* initialize the greyscale buffer: |
213 | Archos: 112 pixels wide, 7 rows (56 pixels) high. | 212 | Archos: 112 pixels wide, 7 rows (56 pixels) high. |
214 | H1x0: 160 pixels wide, 30 rows (120 pixels) high. */ | 213 | H1x0: 160 pixels wide, 30 rows (120 pixels) high. */ |
215 | if (!grey_init(rb, gbuf, gbuf_size, GREY_BUFFERED|GREY_ON_COP, | 214 | if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED|GREY_ON_COP, |
216 | LCD_WIDTH, GFX_HEIGHT, NULL)) | 215 | LCD_WIDTH, GFX_HEIGHT, NULL)) |
217 | { | 216 | { |
218 | rb->splash(HZ, "Not enough memory."); | 217 | rb->splash(HZ, "Not enough memory."); |
@@ -363,9 +362,8 @@ int main(void) | |||
363 | 362 | ||
364 | /*************************** Plugin entry point ****************************/ | 363 | /*************************** Plugin entry point ****************************/ |
365 | 364 | ||
366 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) | 365 | enum plugin_status plugin_start(const void* parameter) |
367 | { | 366 | { |
368 | rb = api; /* copy to global api pointer */ | ||
369 | (void)parameter; | 367 | (void)parameter; |
370 | 368 | ||
371 | return main(); | 369 | return main(); |