summaryrefslogtreecommitdiff
path: root/apps/plugins/fire.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/fire.c')
-rw-r--r--apps/plugins/fire.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index f1b62f5b26..d8b31075ad 100644
--- a/apps/plugins/fire.c
+++ b/apps/plugins/fire.c
@@ -43,8 +43,6 @@
43 43
44PLUGIN_HEADER 44PLUGIN_HEADER
45 45
46static const struct plugin_api* rb; /* global api struct pointer */
47
48#ifndef HAVE_LCD_COLOR 46#ifndef HAVE_LCD_COLOR
49GREY_INFO_STRUCT 47GREY_INFO_STRUCT
50 static unsigned char draw_buffer[FIRE_WIDTH]; 48 static unsigned char draw_buffer[FIRE_WIDTH];
@@ -267,7 +265,7 @@ void cleanup(void *parameter)
267 grey_release(); 265 grey_release();
268#endif 266#endif
269 /* Turn on backlight timeout (revert to settings) */ 267 /* Turn on backlight timeout (revert to settings) */
270 backlight_use_settings(rb); /* backlight control in lib/helper.c */ 268 backlight_use_settings(); /* backlight control in lib/helper.c */
271} 269}
272 270
273 271
@@ -280,7 +278,7 @@ int init_grey(void)
280 /* get the remainder of the plugin buffer */ 278 /* get the remainder of the plugin buffer */
281 gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size); 279 gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
282 280
283 if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP, 281 if (!grey_init(gbuf, gbuf_size, GREY_ON_COP,
284 FIRE_WIDTH, LCD_HEIGHT, NULL)){ 282 FIRE_WIDTH, LCD_HEIGHT, NULL)){
285 rb->splash(HZ, "not enough memory"); 283 rb->splash(HZ, "not enough memory");
286 return PLUGIN_ERROR; 284 return PLUGIN_ERROR;
@@ -312,7 +310,7 @@ int main(void)
312 fire_draw(&fire); 310 fire_draw(&fire);
313 rb->yield(); 311 rb->yield();
314 312
315 action = pluginlib_getaction(rb, 0, plugin_contexts, PLA_ARRAY_COUNT); 313 action = pluginlib_getaction(0, plugin_contexts, PLA_ARRAY_COUNT);
316 314
317 switch(action){ 315 switch(action){
318 case FIRE_QUIT: 316 case FIRE_QUIT:
@@ -346,17 +344,16 @@ int main(void)
346 344
347/*************************** Plugin entry point ****************************/ 345/*************************** Plugin entry point ****************************/
348 346
349enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 347enum plugin_status plugin_start(const void* parameter)
350{ 348{
351 int ret; 349 int ret;
352 350
353 rb = api; //copy to global api pointer
354 (void)parameter; 351 (void)parameter;
355#if LCD_DEPTH > 1 352#if LCD_DEPTH > 1
356 rb->lcd_set_backdrop(NULL); 353 rb->lcd_set_backdrop(NULL);
357#endif 354#endif
358 /* Turn off backlight timeout */ 355 /* Turn off backlight timeout */
359 backlight_force_on(rb); /* backlight control in lib/helper.c */ 356 backlight_force_on(); /* backlight control in lib/helper.c */
360 357
361 ret = main(); 358 ret = main();
362 359