summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c22
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c23
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h3
3 files changed, 48 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 70b41a00e2..17a1cbbb69 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -543,6 +543,13 @@ static uint32_t increment_time(uint32_t val, int32_t amount, uint32_t range)
543 return val; 543 return val;
544} 544}
545 545
546#ifdef HAVE_LCD_ENABLE
547static void get_start_time_lcd_enable_hook(void)
548{
549 rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_0, 0);
550}
551#endif /* HAVE_LCD_ENABLE */
552
546static int get_start_time(uint32_t duration) 553static int get_start_time(uint32_t duration)
547{ 554{
548 int button = 0; 555 int button = 0;
@@ -556,6 +563,10 @@ static int get_start_time(uint32_t duration)
556 lcd_(clear_display)(); 563 lcd_(clear_display)();
557 lcd_(update)(); 564 lcd_(update)();
558 565
566#ifdef HAVE_LCD_ENABLE
567 rb->lcd_set_enable_hook(get_start_time_lcd_enable_hook);
568#endif
569
559 draw_slider(0, 100, &rc_bound); 570 draw_slider(0, 100, &rc_bound);
560 rc_bound.b = rc_bound.t - SLIDER_TMARGIN; 571 rc_bound.b = rc_bound.t - SLIDER_TMARGIN;
561 rc_bound.t = SCREEN_MARGIN; 572 rc_bound.t = SCREEN_MARGIN;
@@ -707,6 +718,13 @@ static int get_start_time(uint32_t duration)
707 slider_state = state9; 718 slider_state = state9;
708 break; 719 break;
709 720
721#ifdef HAVE_LCD_ENABLE
722 case LCD_ENABLE_EVENT_0:
723 if (slider_state == state2)
724 display_thumb_image(&rc_vid);
725 continue;
726#endif
727
710 default: 728 default:
711 rb->default_event_handler(button); 729 rb->default_event_handler(button);
712 rb->yield(); 730 rb->yield();
@@ -736,6 +754,10 @@ static int get_start_time(uint32_t duration)
736 rb->yield(); 754 rb->yield();
737 } 755 }
738 756
757#ifdef HAVE_LCD_ENABLE
758 rb->lcd_set_enable_hook(NULL);
759#endif
760
739#ifndef HAVE_LCD_COLOR 761#ifndef HAVE_LCD_COLOR
740 stream_gray_show(false); 762 stream_gray_show(false);
741 grey_clear_display(); 763 grey_clear_display();
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index 5b92ccced1..42e0ddd5ad 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -587,13 +587,27 @@ static void draw_putsxy_oriented(int x, int y, const char *str)
587} 587}
588#endif /* LCD_PORTRAIT */ 588#endif /* LCD_PORTRAIT */
589 589
590#ifdef HAVE_LCD_ENABLE
591/* So we can refresh the overlay */
592static void wvs_lcd_enable_hook(void)
593{
594 rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_1, 0);
595}
596#endif
597
590static void wvs_backlight_on_video_mode(bool video_on) 598static void wvs_backlight_on_video_mode(bool video_on)
591{ 599{
592 if (video_on) { 600 if (video_on) {
593 /* Turn off backlight timeout */ 601 /* Turn off backlight timeout */
594 /* backlight control in lib/helper.c */ 602 /* backlight control in lib/helper.c */
595 backlight_force_on(rb); 603 backlight_force_on(rb);
604#ifdef HAVE_LCD_ENABLE
605 rb->lcd_set_enable_hook(NULL);
606#endif
596 } else { 607 } else {
608#ifdef HAVE_LCD_ENABLE
609 rb->lcd_set_enable_hook(wvs_lcd_enable_hook);
610#endif
597 /* Revert to user's backlight settings */ 611 /* Revert to user's backlight settings */
598 backlight_use_settings(rb); 612 backlight_use_settings(rb);
599 } 613 }
@@ -1441,6 +1455,15 @@ static void button_loop(void)
1441 continue; 1455 continue;
1442 } /* BUTTON_NONE: */ 1456 } /* BUTTON_NONE: */
1443 1457
1458#ifdef HAVE_LCD_ENABLE
1459 case LCD_ENABLE_EVENT_1:
1460 {
1461 /* Draw the current frame if prepared already */
1462 stream_draw_frame(true);
1463 break;
1464 } /* LCD_ENABLE_EVENT_1: */
1465#endif
1466
1444 case MPEG_VOLUP: 1467 case MPEG_VOLUP:
1445 case MPEG_VOLUP|BUTTON_REPEAT: 1468 case MPEG_VOLUP|BUTTON_REPEAT:
1446#ifdef MPEG_VOLUP2 1469#ifdef MPEG_VOLUP2
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index fa13a1e378..571c28883d 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -104,4 +104,7 @@ enum mpeg_malloc_reason_t
104#include "disk_buf.h" 104#include "disk_buf.h"
105#include "stream_mgr.h" 105#include "stream_mgr.h"
106 106
107#define LCD_ENABLE_EVENT_0 MAKE_SYS_EVENT(SYS_EVENT_CLS_PRIVATE, 0)
108#define LCD_ENABLE_EVENT_1 MAKE_SYS_EVENT(SYS_EVENT_CLS_PRIVATE, 1)
109
107#endif /* MPEGPLAYER_H */ 110#endif /* MPEGPLAYER_H */