summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpeg_settings.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-28 10:17:16 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-28 10:17:16 +0000
commitadf2e4c9a012fda200431c92cb2c1707dbe2f0a3 (patch)
tree3a2755b05f9e2092d5bff458929b825c955c66f1 /apps/plugins/mpegplayer/mpeg_settings.c
parentb57b779fbced4a3fc1ecd0799a7666c2f1645f17 (diff)
downloadrockbox-adf2e4c9a012fda200431c92cb2c1707dbe2f0a3.zip
rockbox-adf2e4c9a012fda200431c92cb2c1707dbe2f0a3.tar.gz
rockbox-adf2e4c9a012fda200431c92cb2c1707dbe2f0a3.tar.bz2
rockbox-adf2e4c9a012fda200431c92cb2c1707dbe2f0a3.tar.xz
Targets with HAVE_LCD_ENABLE: Provide a means to receive notifications when the lcd is enabled and the image is refreshed so overlayed drawing can also be refreshed. Chiefly mpegplayer needs this so it can redraw the YUV data after the backlight is turned on while paused or when using 'Set Start Time'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17640 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_settings.c')
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 70b41a0..17a1cbb 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)
return val;
}
+#ifdef HAVE_LCD_ENABLE
+static void get_start_time_lcd_enable_hook(void)
+{
+ rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_0, 0);
+}
+#endif /* HAVE_LCD_ENABLE */
+
static int get_start_time(uint32_t duration)
{
int button = 0;
@@ -556,6 +563,10 @@ static int get_start_time(uint32_t duration)
lcd_(clear_display)();
lcd_(update)();
+#ifdef HAVE_LCD_ENABLE
+ rb->lcd_set_enable_hook(get_start_time_lcd_enable_hook);
+#endif
+
draw_slider(0, 100, &rc_bound);
rc_bound.b = rc_bound.t - SLIDER_TMARGIN;
rc_bound.t = SCREEN_MARGIN;
@@ -707,6 +718,13 @@ static int get_start_time(uint32_t duration)
slider_state = state9;
break;
+#ifdef HAVE_LCD_ENABLE
+ case LCD_ENABLE_EVENT_0:
+ if (slider_state == state2)
+ display_thumb_image(&rc_vid);
+ continue;
+#endif
+
default:
rb->default_event_handler(button);
rb->yield();
@@ -736,6 +754,10 @@ static int get_start_time(uint32_t duration)
rb->yield();
}
+#ifdef HAVE_LCD_ENABLE
+ rb->lcd_set_enable_hook(NULL);
+#endif
+
#ifndef HAVE_LCD_COLOR
stream_gray_show(false);
grey_clear_display();