Decouple the statusbar drawing from the rest of the screen drawing. it is not drawn roughly 4x per second automatically.

viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.)
All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false).

This commit also includes some menu/list viewport cleanups from kugel in FS#9603


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2008-12-31 05:59:26 +00:00
parent 54919ae917
commit e385ee18ce
46 changed files with 294 additions and 264 deletions

View file

@ -743,7 +743,6 @@ int kbd_input(char* text, int buflen)
sc->set_drawmode(DRMODE_SOLID);
}
gui_syncstatusbar_draw(&statusbars, true);
FOR_NB_SCREENS(l)
screens[l].update();
@ -1190,7 +1189,6 @@ int kbd_input(char* text, int buflen)
#endif /* !defined (KBD_MODES) || defined (KBD_CURSOR_KEYS) */
case BUTTON_NONE:
gui_syncstatusbar_draw(&statusbars, false);
#ifdef KBD_MORSE_INPUT
if (morse_reading)
{

View file

@ -489,7 +489,6 @@ int radio_screen(void)
/* always display status bar in radio screen for now */
global_status.statusbar_forced = statusbar?0:1;
global_settings.statusbar = true;
gui_syncstatusbar_draw(&statusbars,true);
FOR_NB_SCREENS(i)
{
viewport_set_defaults(&vp[i], i);
@ -986,8 +985,6 @@ int radio_screen(void)
gui_buttonbar_draw(&buttonbar);
#endif
}
/* Only force the redraw if update_screen is true */
gui_syncstatusbar_draw(&statusbars,true);
}
update_screen = false;
@ -1027,7 +1024,6 @@ int radio_screen(void)
if(audio_status() & AUDIO_STATUS_ERROR)
{
splash(0, str(LANG_DISK_FULL));
gui_syncstatusbar_draw(&statusbars,true);
FOR_NB_SCREENS(i)
{
screens[i].set_viewport(&vp[i]);
@ -1397,7 +1393,6 @@ static int handle_radio_presets(void)
while (result == 0)
{
gui_synclist_draw(&lists);
gui_syncstatusbar_draw(&statusbars, true);
list_do_action(CONTEXT_STD, TIMEOUT_BLOCK,
&lists, &action, LIST_WRAP_UNLESS_HELD);
switch (action)

View file

@ -1038,7 +1038,6 @@ bool recording_screen(bool no_source)
bool statusbar = global_settings.statusbar;
global_status.statusbar_forced = statusbar?0:1;
global_settings.statusbar = true;
gui_syncstatusbar_draw(&statusbars,true);
#endif
static const unsigned char *byte_units[] = {
@ -1102,7 +1101,7 @@ bool recording_screen(bool no_source)
/* top vp, 4 lines, force sys font if total screen < 6 lines
NOTE: one could limit the list to 1 line and get away with 5 lines */
v = &vp_top[i];
viewport_set_defaults(v, i); /*already takes care of statusbar*/
viewport_set_defaults(v, i);
if (viewport_get_nb_lines(v) < 4)
{
/* compact needs 4 lines total */
@ -1864,7 +1863,6 @@ bool recording_screen(bool no_source)
/* draw peakmeter again (check if this can be removed) */
FOR_NB_ACTIVE_SCREENS(i)
{
screens[i].set_viewport(NULL);
gui_statusbar_draw(&(statusbars.statusbars[i]), true);
screens[i].set_viewport(&vp_top[i]);
peak_meter_screen(&screens[i], pm_x[i], pm_y[i], pm_h[i]);
@ -1882,7 +1880,6 @@ bool recording_screen(bool no_source)
if (audio_stat & AUDIO_STATUS_ERROR)
{
splash(0, str(LANG_DISK_FULL));
gui_syncstatusbar_draw(&statusbars, true);
FOR_NB_SCREENS(i)
screens[i].update();