diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-04-01 05:17:20 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-04-01 05:17:20 +0000 |
commit | 8580674b10072b43531660652ff8103c6a980157 (patch) | |
tree | 111f6e9278413372812061c8c9f6bd3edf12d572 /apps/plugins/mpegplayer/mpegplayer.c | |
parent | f047e3aee92a929cbfd6ff0faf12d82c3b468844 (diff) |
Add initial support for changing the LCD mode in MPEG player for hardware YUV conversion (256 color palette mode will also be added for doom and rockboy). This fixes the LCD mode/colors when MPEGPlayer exits.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20600 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.c')
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 82ebfb1111..055c1b2b84 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -1459,6 +1459,10 @@ static void button_loop(void) rb->lcd_clear_display(); rb->lcd_update(); +#if (HAVE_LCD_MODES & LCD_MODE_YUV) + rb->lcd_set_mode(LCD_MODE_YUV); +#endif + wvs_init(); /* Start playback at the specified starting time */ @@ -1537,6 +1541,10 @@ static void button_loop(void) stream_show_vo(false); wvs_backlight_brightness_video_mode(false); +#if (HAVE_LCD_MODES & LCD_MODE_YUV) + rb->lcd_set_mode(LCD_MODE_RGB565); +#endif + result = mpeg_menu(0); /* The menu can change the font, so restore */ @@ -1549,6 +1557,9 @@ static void button_loop(void) break; default: +#if (HAVE_LCD_MODES & LCD_MODE_YUV) + rb->lcd_set_mode(LCD_MODE_YUV); +#endif /* If not stopped, show video again */ if (state != STREAM_STOPPED) { wvs_show(WVS_SHOW); @@ -1707,6 +1718,10 @@ enum plugin_status plugin_start(const void* parameter) rb->splashf(HZ*2, errstring, err); } } + +#if (HAVE_LCD_MODES & LCD_MODE_YUV) + rb->lcd_set_mode(LCD_MODE_RGB565); +#endif stream_exit(); |