summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpegplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.c')
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 0b5bb518fe..fbd3dc6b2c 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -280,9 +280,7 @@ CONFIG_KEYPAD == SANSA_M200_PAD
280#endif 280#endif
281#endif 281#endif
282 282
283const struct plugin_api* rb; 283CACHE_FUNCTION_WRAPPERS;
284
285CACHE_FUNCTION_WRAPPERS(rb);
286 284
287/* One thing we can do here for targets with remotes is having a display 285/* One thing we can do here for targets with remotes is having a display
288 * always on the remote instead of always forcing a popup on the main display */ 286 * always on the remote instead of always forcing a popup on the main display */
@@ -622,7 +620,7 @@ static void wvs_backlight_on_video_mode(bool video_on)
622 if (video_on) { 620 if (video_on) {
623 /* Turn off backlight timeout */ 621 /* Turn off backlight timeout */
624 /* backlight control in lib/helper.c */ 622 /* backlight control in lib/helper.c */
625 backlight_force_on(rb); 623 backlight_force_on();
626#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 624#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
627 rb->lcd_set_enable_hook(NULL); 625 rb->lcd_set_enable_hook(NULL);
628#endif 626#endif
@@ -631,7 +629,7 @@ static void wvs_backlight_on_video_mode(bool video_on)
631 rb->lcd_set_enable_hook(wvs_lcd_enable_hook); 629 rb->lcd_set_enable_hook(wvs_lcd_enable_hook);
632#endif 630#endif
633 /* Revert to user's backlight settings */ 631 /* Revert to user's backlight settings */
634 backlight_use_settings(rb); 632 backlight_use_settings();
635 } 633 }
636} 634}
637 635
@@ -1625,7 +1623,7 @@ static void button_loop(void)
1625 rb->lcd_setfont(FONT_UI); 1623 rb->lcd_setfont(FONT_UI);
1626} 1624}
1627 1625
1628enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 1626enum plugin_status plugin_start(const void* parameter)
1629{ 1627{
1630 int status = PLUGIN_ERROR; /* assume failure */ 1628 int status = PLUGIN_ERROR; /* assume failure */
1631 int result; 1629 int result;
@@ -1634,17 +1632,15 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
1634 1632
1635 if (parameter == NULL) { 1633 if (parameter == NULL) {
1636 /* No file = GTFO */ 1634 /* No file = GTFO */
1637 api->splash(HZ*2, "No File"); 1635 rb->splash(HZ*2, "No File");
1638 return PLUGIN_ERROR; 1636 return PLUGIN_ERROR;
1639 } 1637 }
1640 1638
1641 /* Disable all talking before initializing IRAM */ 1639 /* Disable all talking before initializing IRAM */
1642 api->talk_disable(true); 1640 rb->talk_disable(true);
1643 1641
1644 /* Initialize IRAM - stops audio and voice as well */ 1642 /* Initialize IRAM - stops audio and voice as well */
1645 PLUGIN_IRAM_INIT(api) 1643 PLUGIN_IRAM_INIT(rb)
1646
1647 rb = api;
1648 1644
1649#ifdef HAVE_LCD_COLOR 1645#ifdef HAVE_LCD_COLOR
1650 rb->lcd_set_backdrop(NULL); 1646 rb->lcd_set_backdrop(NULL);