diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-10-20 21:54:59 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-20 21:54:59 +0000 |
commit | d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e (patch) | |
tree | 2f51ed47fee689024ed8c145634044362c8ed7d5 /apps/gui/wps.c | |
parent | 774bacc692b4d5c7b769bb88d24e182db9e4656f (diff) | |
download | rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.tar.gz rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.zip |
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
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r-- | apps/gui/wps.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 11ce946e98..6d9d8443dd 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -562,8 +562,9 @@ static void play_hop(int direction) | |||
562 | * we suppress updates until the wps is activated again (the lcd driver will | 562 | * we suppress updates until the wps is activated again (the lcd driver will |
563 | * call this hook to issue an instant update) | 563 | * call this hook to issue an instant update) |
564 | * */ | 564 | * */ |
565 | static void wps_lcd_activation_hook(void) | 565 | static void wps_lcd_activation_hook(void *param) |
566 | { | 566 | { |
567 | (void)param; | ||
567 | wps_state.do_full_update = true; | 568 | wps_state.do_full_update = true; |
568 | /* force timeout in wps main loop, so that the update is instantly */ | 569 | /* force timeout in wps main loop, so that the update is instantly */ |
569 | queue_post(&button_queue, BUTTON_NONE, 0); | 570 | queue_post(&button_queue, BUTTON_NONE, 0); |
@@ -585,7 +586,7 @@ static void gwps_leave_wps(void) | |||
585 | viewportmanager_set_statusbar(oldbars); | 586 | viewportmanager_set_statusbar(oldbars); |
586 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 587 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
587 | /* Play safe and unregister the hook */ | 588 | /* Play safe and unregister the hook */ |
588 | lcd_activation_set_hook(NULL); | 589 | remove_event(LCD_EVENT_ACTIVATION, wps_lcd_activation_hook); |
589 | #endif | 590 | #endif |
590 | /* unhandle statusbar update delay */ | 591 | /* unhandle statusbar update delay */ |
591 | sb_skin_set_update_delay(DEFAULT_UPDATE_DELAY); | 592 | sb_skin_set_update_delay(DEFAULT_UPDATE_DELAY); |
@@ -1164,13 +1165,9 @@ long gui_wps_show(void) | |||
1164 | FOR_NB_SCREENS(i) | 1165 | FOR_NB_SCREENS(i) |
1165 | { | 1166 | { |
1166 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 1167 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
1167 | if (lcd_active() | ||
1168 | #ifdef HAVE_REMOTE_LCD | ||
1169 | /* currently, all remotes are readable without backlight | 1168 | /* currently, all remotes are readable without backlight |
1170 | * so still update those */ | 1169 | * so still update those */ |
1171 | || (i == SCREEN_REMOTE) | 1170 | if (lcd_active() || (i != SCREEN_MAIN)) |
1172 | #endif | ||
1173 | ) | ||
1174 | #endif | 1171 | #endif |
1175 | { | 1172 | { |
1176 | skin_update(&gui_wps[i], WPS_REFRESH_NON_STATIC); | 1173 | skin_update(&gui_wps[i], WPS_REFRESH_NON_STATIC); |
@@ -1193,7 +1190,7 @@ long gui_wps_show(void) | |||
1193 | restore = false; | 1190 | restore = false; |
1194 | restoretimer = RESTORE_WPS_INSTANTLY; | 1191 | restoretimer = RESTORE_WPS_INSTANTLY; |
1195 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 1192 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
1196 | lcd_activation_set_hook(wps_lcd_activation_hook); | 1193 | add_event(LCD_EVENT_ACTIVATION, false, wps_lcd_activation_hook); |
1197 | #endif | 1194 | #endif |
1198 | /* we remove the update delay since it's not very usable in the wps, | 1195 | /* we remove the update delay since it's not very usable in the wps, |
1199 | * e.g. during volume changing or ffwd/rewind */ | 1196 | * e.g. during volume changing or ffwd/rewind */ |