diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-11-16 01:38:30 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-11-16 01:38:30 +0000 |
| commit | bdf2961ba3c0d6ac1b58d6e4acd748415d4cfdd6 (patch) | |
| tree | 2311c321ca36b82e9bfc521442871998979e49b0 /apps/gui/wps.c | |
| parent | d5af5c061c92dc4e662d6fa423643796d29158ee (diff) | |
| download | rockbox-bdf2961ba3c0d6ac1b58d6e4acd748415d4cfdd6.zip rockbox-bdf2961ba3c0d6ac1b58d6e4acd748415d4cfdd6.tar.gz rockbox-bdf2961ba3c0d6ac1b58d6e4acd748415d4cfdd6.tar.bz2 rockbox-bdf2961ba3c0d6ac1b58d6e4acd748415d4cfdd6.tar.xz | |
Fix some drawing problems when displaying the WPS initially with sbs enabled. Move initial display of the wps to wps.c too. Should fix bug 3 of FS#10771.
Also change GUI_EVENT_REFRESH event handling so that the passed drawing function is always called, not only when sbs or custom ui vp are used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23644 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps.c')
| -rw-r--r-- | apps/gui/wps.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 9236f9f..88d5c91 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -582,6 +582,31 @@ static void gwps_leave_wps(void) send_event(GUI_EVENT_REFRESH, NULL); } +/* + * display the wps on entering or restoring */ +static void gwps_enter_wps(void) +{ + int i; + FOR_NB_SCREENS(i) + { + struct gui_wps *gwps = &gui_wps[i]; + struct screen *display = gwps->display; + + display->stop_scroll(); + /* Update the values in the first (default) viewport - in case the user + has modified the statusbar or colour settings */ +#if LCD_DEPTH > 1 + if (display->depth > 1) + { + struct viewport *vp = &find_viewport(VP_DEFAULT_LABEL, gwps->data)->vp; + vp->fg_pattern = display->get_foreground(); + vp->bg_pattern = display->get_background(); + } +#endif + skin_update(gwps, WPS_REFRESH_ALL); + } +} + #ifdef HAVE_TOUCHSCREEN int wps_get_touchaction(struct wps_data *data) { @@ -1169,10 +1194,8 @@ long gui_wps_show(void) * e.g. during volume changing or ffwd/rewind */ sb_skin_set_update_delay(0); FOR_NB_SCREENS(i) - { - screens[i].stop_scroll(); - gui_wps_display(&gui_wps[i]); - } + gui_wps[i].display->backdrop_show(BACKDROP_SKIN_WPS); + send_event(GUI_EVENT_REFRESH, gwps_enter_wps); } if (exit) { |