1
0
Fork 0
forked from len0rd/rockbox

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

@ -121,6 +121,16 @@ const char appsversion[]=APPSVERSION;
static void init(void);
void fourhertz_tick_task(void)
{
static long last_fire = 0;
if (TIME_AFTER(current_tick, last_fire+HZ/4))
{
queue_post(&button_queue, SYS_FOURHERTZ, 0);
last_fire = current_tick;
}
}
#ifdef SIMULATOR
void app_main(void)
#else
@ -138,6 +148,10 @@ static void app_main(void)
#ifdef HAVE_TOUCHSCREEN
touchscreen_set_mode(TOUCHSCREEN_BUTTON);
#endif
tick_add_task(fourhertz_tick_task);
viewportmanager_set_statusbar(true);
add_event(GUI_EVENT_STATUSBAR_TOGGLE, false,
viewportmanager_statusbar_changed);
root_menu();
}