1
0
Fork 0
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:
Peter D'Hoye 2008-05-19 21:37:43 +00:00
parent 1d28fe7d79
commit 3dd52e3798

View file

@ -644,6 +644,7 @@ static enum menu_result jewels_showmenu(struct jewels_menu* menu,
int w, h; int w, h;
int firstline; int firstline;
int adj; int adj;
int extraline = LCD_HEIGHT <= ((menu->itemcnt+2)*FONT_HEIGHT) ? 0 : 1;
/* handle menu command */ /* handle menu command */
switch(cmd) { switch(cmd) {
@ -686,7 +687,8 @@ static enum menu_result jewels_showmenu(struct jewels_menu* menu,
if(i == menu->selected) { if(i == menu->selected) {
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 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); menu->items[i].text);
if(i == menu->selected) { if(i == menu->selected) {
rb->lcd_set_drawmode(DRMODE_SOLID); rb->lcd_set_drawmode(DRMODE_SOLID);