forked from len0rd/rockbox
Fix FS #9003: only add the extra space in the jewels menu when there's room for it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17585 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1d28fe7d79
commit
3dd52e3798
1 changed files with 3 additions and 1 deletions
|
|
@ -644,6 +644,7 @@ static enum menu_result jewels_showmenu(struct jewels_menu* menu,
|
|||
int w, h;
|
||||
int firstline;
|
||||
int adj;
|
||||
int extraline = LCD_HEIGHT <= ((menu->itemcnt+2)*FONT_HEIGHT) ? 0 : 1;
|
||||
|
||||
/* handle menu command */
|
||||
switch(cmd) {
|
||||
|
|
@ -686,7 +687,8 @@ static enum menu_result jewels_showmenu(struct jewels_menu* menu,
|
|||
if(i == menu->selected) {
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
}
|
||||
rb->lcd_putsxy((LCD_WIDTH-MENU_WIDTH)/2, (firstline+i+2)*FONT_HEIGHT,
|
||||
rb->lcd_putsxy((LCD_WIDTH-MENU_WIDTH)/2,
|
||||
(firstline+i+1+extraline)*FONT_HEIGHT,
|
||||
menu->items[i].text);
|
||||
if(i == menu->selected) {
|
||||
rb->lcd_set_drawmode(DRMODE_SOLID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue