diff options
Diffstat (limited to 'apps/plugins/cube.c')
-rw-r--r-- | apps/plugins/cube.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index d43f06f4b8..9ba7a70385 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c | |||
@@ -413,8 +413,6 @@ static long matrice[3][3]; | |||
413 | static const int nb_points = 8; | 413 | static const int nb_points = 8; |
414 | static long z_off = 600; | 414 | static long z_off = 600; |
415 | 415 | ||
416 | static const struct plugin_api* rb; | ||
417 | |||
418 | static void cube_rotate(int xa, int ya, int za) | 416 | static void cube_rotate(int xa, int ya, int za) |
419 | { | 417 | { |
420 | int i; | 418 | int i; |
@@ -568,7 +566,7 @@ void cleanup(void *parameter) | |||
568 | #endif | 566 | #endif |
569 | } | 567 | } |
570 | 568 | ||
571 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) | 569 | enum plugin_status plugin_start(const void* parameter) |
572 | { | 570 | { |
573 | char buffer[30]; | 571 | char buffer[30]; |
574 | int t_disp = 0; | 572 | int t_disp = 0; |
@@ -587,14 +585,11 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
587 | bool exit = false; | 585 | bool exit = false; |
588 | 586 | ||
589 | (void)(parameter); | 587 | (void)(parameter); |
590 | rb = api; | ||
591 | 588 | ||
592 | #ifdef HAVE_LCD_BITMAP | 589 | #ifdef HAVE_LCD_BITMAP |
593 | #if LCD_DEPTH > 1 | 590 | #if defined(USE_GSLIB) |
594 | xlcd_init(rb); | ||
595 | #elif defined(USE_GSLIB) | ||
596 | gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); | 591 | gbuf = (unsigned char *)rb->plugin_get_buffer(&gbuf_size); |
597 | if (!grey_init(rb, gbuf, gbuf_size, GREY_BUFFERED, | 592 | if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED, |
598 | LCD_WIDTH, LCD_HEIGHT, NULL)) | 593 | LCD_WIDTH, LCD_HEIGHT, NULL)) |
599 | { | 594 | { |
600 | rb->splash(HZ, "Couldn't init greyscale display"); | 595 | rb->splash(HZ, "Couldn't init greyscale display"); |
@@ -614,7 +609,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
614 | #endif | 609 | #endif |
615 | rb->lcd_setfont(FONT_SYSFIXED); | 610 | rb->lcd_setfont(FONT_SYSFIXED); |
616 | #else /* LCD_CHARCELLS */ | 611 | #else /* LCD_CHARCELLS */ |
617 | if (!pgfx_init(rb, 4, 2)) | 612 | if (!pgfx_init(4, 2)) |
618 | { | 613 | { |
619 | rb->splash(HZ*2, "Old LCD :("); | 614 | rb->splash(HZ*2, "Old LCD :("); |
620 | return PLUGIN_OK; | 615 | return PLUGIN_OK; |