summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c7
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c9
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index df926f4c17..eb55c1444e 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -599,8 +599,9 @@ static uint32_t increment_time(uint32_t val, int32_t amount, uint32_t range)
599} 599}
600 600
601#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 601#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
602static void get_start_time_lcd_enable_hook(void) 602static void get_start_time_lcd_enable_hook(void *param)
603{ 603{
604 (void)param;
604 rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_0, 0); 605 rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_0, 0);
605} 606}
606#endif /* HAVE_LCD_ENABLE */ 607#endif /* HAVE_LCD_ENABLE */
@@ -619,7 +620,7 @@ static int get_start_time(uint32_t duration)
619 lcd_(update)(); 620 lcd_(update)();
620 621
621#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 622#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
622 rb->lcd_activation_set_hook(get_start_time_lcd_enable_hook); 623 rb->add_event(LCD_EVENT_ACTIVATION, false, get_start_time_lcd_enable_hook);
623#endif 624#endif
624 625
625 draw_slider(0, 100, &rc_bound); 626 draw_slider(0, 100, &rc_bound);
@@ -810,7 +811,7 @@ static int get_start_time(uint32_t duration)
810 } 811 }
811 812
812#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 813#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
813 rb->lcd_activation_set_hook(NULL); 814 rb->remove_event(LCD_EVENT_ACTIVATION, get_start_time_lcd_enable_hook);
814#endif 815#endif
815#ifndef HAVE_LCD_COLOR 816#ifndef HAVE_LCD_COLOR
816 stream_gray_show(false); 817 stream_gray_show(false);
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 0cb5f94d19..7c52a47260 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -652,8 +652,9 @@ static void draw_putsxy_oriented(int x, int y, const char *str)
652 652
653#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 653#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
654/* So we can refresh the overlay */ 654/* So we can refresh the overlay */
655static void wvs_lcd_enable_hook(void) 655static void wvs_lcd_enable_hook(void* param)
656{ 656{
657 (void)param;
657 rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_1, 0); 658 rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_1, 0);
658} 659}
659#endif 660#endif
@@ -665,11 +666,11 @@ static void wvs_backlight_on_video_mode(bool video_on)
665 /* backlight control in lib/helper.c */ 666 /* backlight control in lib/helper.c */
666 backlight_force_on(); 667 backlight_force_on();
667#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 668#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
668 rb->lcd_activation_set_hook(NULL); 669 rb->remove_event(LCD_EVENT_ACTIVATION, wvs_lcd_enable_hook);
669#endif 670#endif
670 } else { 671 } else {
671#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 672#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
672 rb->lcd_activation_set_hook(wvs_lcd_enable_hook); 673 rb->add_event(LCD_EVENT_ACTIVATION, false, wvs_lcd_enable_hook);
673#endif 674#endif
674 /* Revert to user's backlight settings */ 675 /* Revert to user's backlight settings */
675 backlight_use_settings(); 676 backlight_use_settings();
@@ -1671,7 +1672,7 @@ static void button_loop(void)
1671#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 1672#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
1672 /* Be sure hook is removed before exiting since the stop will put it 1673 /* Be sure hook is removed before exiting since the stop will put it
1673 * back because of the backlight restore. */ 1674 * back because of the backlight restore. */
1674 rb->lcd_activation_set_hook(NULL); 1675 rb->remove_event(LCD_EVENT_ACTIVATION, wvs_lcd_enable_hook);
1675#endif 1676#endif
1676 1677
1677 rb->lcd_setfont(FONT_UI); 1678 rb->lcd_setfont(FONT_UI);