forked from len0rd/rockbox
Put exiting the wps entirely into the hands of the wps (restoring backdrops and statusbars, stop scrolling). Remove the restoration code from root_menu, and add some gwps_leave_wps at every possible return/screen change. This also unifies exiting the wps code-wise.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20399 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cd34de693c
commit
ce6b116bc1
2 changed files with 10 additions and 17 deletions
|
|
@ -172,18 +172,20 @@ void gwps_fix_statusbars(void)
|
|||
|
||||
static void gwps_leave_wps(void)
|
||||
{
|
||||
int oldbars = VP_SB_HIDE_ALL;
|
||||
int i, oldbars = VP_SB_HIDE_ALL;
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].display->stop_scroll();
|
||||
if (global_settings.statusbar)
|
||||
oldbars = VP_SB_ALLSCREENS;
|
||||
|
||||
viewportmanager_set_statusbar(oldbars);
|
||||
#if LCD_DEPTH > 1
|
||||
show_main_backdrop();
|
||||
#endif
|
||||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||
show_remote_main_backdrop();
|
||||
#endif
|
||||
viewportmanager_set_statusbar(oldbars);
|
||||
}
|
||||
|
||||
/* The WPS can be left in two ways:
|
||||
|
|
@ -207,7 +209,6 @@ long gui_wps_show(void)
|
|||
long last_left = 0, last_right = 0;
|
||||
|
||||
wps_state_init();
|
||||
gwps_fix_statusbars();
|
||||
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
status_set_audio(true);
|
||||
|
|
@ -221,6 +222,7 @@ long gui_wps_show(void)
|
|||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||
show_remote_wps_backdrop();
|
||||
#endif
|
||||
gwps_fix_statusbars();
|
||||
|
||||
#ifdef AB_REPEAT_ENABLE
|
||||
ab_repeat_init();
|
||||
|
|
@ -232,7 +234,10 @@ long gui_wps_show(void)
|
|||
wps_state.nid3 = audio_next_track();
|
||||
if (wps_state.id3) {
|
||||
if (gui_wps_display())
|
||||
{
|
||||
gwps_leave_wps();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
restore = true;
|
||||
|
|
@ -351,8 +356,7 @@ long gui_wps_show(void)
|
|||
status_set_record(false);
|
||||
status_set_audio(false);
|
||||
#endif
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].display->stop_scroll();
|
||||
gwps_leave_wps();
|
||||
return GO_TO_PREVIOUS_BROWSER;
|
||||
break;
|
||||
|
||||
|
|
@ -578,8 +582,7 @@ long gui_wps_show(void)
|
|||
break;
|
||||
/* menu key functions */
|
||||
case ACTION_WPS_MENU:
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].display->stop_scroll();
|
||||
gwps_leave_wps();
|
||||
return GO_TO_ROOT;
|
||||
break;
|
||||
|
||||
|
|
@ -707,8 +710,6 @@ long gui_wps_show(void)
|
|||
if (global_settings.fade_on_stop)
|
||||
fade(false, true);
|
||||
|
||||
FOR_NB_SCREENS(i)
|
||||
gui_wps[i].display->stop_scroll();
|
||||
if (bookmark)
|
||||
bookmark_autobookmark();
|
||||
audio_stop();
|
||||
|
|
|
|||
|
|
@ -262,14 +262,6 @@ static int wpsscrn(void* param)
|
|||
{
|
||||
splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
|
||||
}
|
||||
#if LCD_DEPTH > 1
|
||||
show_main_backdrop();
|
||||
#endif
|
||||
#if defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1
|
||||
show_remote_main_backdrop();
|
||||
#endif
|
||||
/* always re-enable the statusbar after the WPS */
|
||||
viewportmanager_set_statusbar(VP_SB_ALLSCREENS);
|
||||
return ret_val;
|
||||
}
|
||||
#if CONFIG_TUNER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue