From d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 20 Oct 2009 21:54:59 +0000 Subject: Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar). Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing). Removed corresponding functions from the core and plugin api. Bump min version and sort. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/mpegplayer/mpeg_settings.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/plugins/mpegplayer/mpeg_settings.c') 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) } #if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) -static void get_start_time_lcd_enable_hook(void) +static void get_start_time_lcd_enable_hook(void *param) { + (void)param; rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_0, 0); } #endif /* HAVE_LCD_ENABLE */ @@ -619,7 +620,7 @@ static int get_start_time(uint32_t duration) lcd_(update)(); #if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) - rb->lcd_activation_set_hook(get_start_time_lcd_enable_hook); + rb->add_event(LCD_EVENT_ACTIVATION, false, get_start_time_lcd_enable_hook); #endif draw_slider(0, 100, &rc_bound); @@ -810,7 +811,7 @@ static int get_start_time(uint32_t duration) } #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) - rb->lcd_activation_set_hook(NULL); + rb->remove_event(LCD_EVENT_ACTIVATION, get_start_time_lcd_enable_hook); #endif #ifndef HAVE_LCD_COLOR stream_gray_show(false); -- cgit v1.2.3