mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
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:
parent
54919ae917
commit
e385ee18ce
46 changed files with 294 additions and 264 deletions
|
|
@ -674,7 +674,6 @@ static bool view_events(int selected, struct shown *shown)
|
|||
|
||||
while (!exit)
|
||||
{
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
||||
button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK);
|
||||
rb->gui_synclist_do_button(&gui_memos,&button,LIST_WRAP_UNLESS_HELD);
|
||||
|
||||
|
|
|
|||
|
|
@ -640,7 +640,6 @@ struct pgn_game_node* pgn_show_game_list(const struct plugin_api* api,
|
|||
rb->gui_synclist_select_item(&games_list, 0);
|
||||
|
||||
while (true) {
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
||||
rb->gui_synclist_draw(&games_list);
|
||||
curr_selection = rb->gui_synclist_get_sel_pos(&games_list);
|
||||
button = rb->get_action(CONTEXT_LIST,TIMEOUT_BLOCK);
|
||||
|
|
|
|||
|
|
@ -556,7 +556,6 @@ static int keybox(void)
|
|||
|
||||
while (!done)
|
||||
{
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
||||
rb->gui_synclist_draw(&kb_list);
|
||||
button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK);
|
||||
if (rb->gui_synclist_do_button(&kb_list, &button, LIST_WRAP_ON))
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ int menu_show(int m)
|
|||
int key;
|
||||
|
||||
rb->gui_synclist_draw(&(menus[m].synclist));
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
||||
while (!exit) {
|
||||
key = rb->get_action(CONTEXT_MAINMENU,HZ/2);
|
||||
/*
|
||||
|
|
@ -126,7 +125,6 @@ int menu_show(int m)
|
|||
return MENU_ATTACHED_USB;
|
||||
break;
|
||||
}
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, false);
|
||||
}
|
||||
return MENU_SELECTED_EXIT;
|
||||
}
|
||||
|
|
@ -149,7 +147,6 @@ bool menu_run(int m)
|
|||
if (menus[m].items[selected].function &&
|
||||
menus[m].items[selected].function())
|
||||
return true;
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,6 @@ enum sc_list_action_type draw_sc_list(struct gui_synclist gui_sc)
|
|||
rb->gui_synclist_draw(&gui_sc);
|
||||
|
||||
while (true) {
|
||||
/* draw the statusbar, should be done often */
|
||||
rb->gui_syncstatusbar_draw(rb->statusbars, true);
|
||||
/* user input */
|
||||
button = rb->get_action(CONTEXT_LIST, TIMEOUT_BLOCK);
|
||||
if (rb->gui_synclist_do_button(&gui_sc, &button,
|
||||
|
|
|
|||
|
|
@ -1008,9 +1008,6 @@ static int star_menu(void)
|
|||
FOR_NB_SCREENS(selection)
|
||||
{
|
||||
rb->viewport_set_defaults(&vp[selection], selection);
|
||||
/* we are hiding the statusbar so fix the height also */
|
||||
vp[selection].y = 0;
|
||||
vp[selection].height = rb->screens[selection]->lcdheight;
|
||||
#if LCD_DEPTH > 1
|
||||
if (rb->screens[selection]->depth > 1)
|
||||
{
|
||||
|
|
@ -1112,7 +1109,6 @@ static int star_menu(void)
|
|||
level--;
|
||||
star_run_game(level);
|
||||
}
|
||||
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -443,8 +443,6 @@ int zx_kbd_input(char* text/*, int buflen*/)
|
|||
rb->screens[l]->set_drawmode(DRMODE_SOLID);
|
||||
}
|
||||
|
||||
|
||||
/* gui_syncstatusbar_draw(&statusbars, true);*/
|
||||
FOR_NB_SCREENS(l)
|
||||
rb->screens[l]->update();
|
||||
|
||||
|
|
@ -554,10 +552,6 @@ int zx_kbd_input(char* text/*, int buflen*/)
|
|||
}
|
||||
break;
|
||||
|
||||
case BUTTON_NONE:
|
||||
/*gui_syncstatusbar_draw(&statusbars, false);*/
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
if(rb->default_event_handler(button) == SYS_USB_CONNECTED)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue