1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2008-05-28 10:17:16 +00:00
parent b57b779fbc
commit adf2e4c9a0
15 changed files with 90 additions and 1 deletions

View file

@ -49,6 +49,10 @@ fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH]
static fb_data* lcd_backdrop = NULL;
static long lcd_backdrop_offset IDATA_ATTR = 0;
#ifdef HAVE_LCD_ENABLE
static void (*lcd_enable_hook)(void) = NULL;
#endif
static struct viewport default_vp =
{
.x = 0,
@ -84,6 +88,23 @@ void lcd_init(void)
scroll_init();
}
/*** Helpers - consolidate optional code ***/
#ifdef HAVE_LCD_ENABLE
void lcd_set_enable_hook(void (*enable_hook)(void))
{
lcd_enable_hook = enable_hook;
}
/* To be called by target driver after enabling display and refreshing it */
void lcd_call_enable_hook(void)
{
void (*enable_hook)(void) = lcd_enable_hook;
if (enable_hook != NULL)
enable_hook();
}
#endif
/*** Viewports ***/
void lcd_set_viewport(struct viewport* vp)