-fixed configured overlay setting not being applied on first start

-added left/right as page up/down keys in ROM browsers
This commit is contained in:
ekeeke31 2012-05-02 18:40:38 +00:00
parent 6743bac508
commit 3f0547776b
2 changed files with 39 additions and 33 deletions

View File

@ -494,14 +494,11 @@ int FileSelector(int type)
}
/* go back one page */
else if (p & PAD_TRIGGER_L)
else if (p & (PAD_TRIGGER_L | PAD_BUTTON_LEFT))
{
selection -= 10;
if (selection < 0)
{
selection = maxfiles - 1;
offset = selection - 10 + 1;
}
selection = offset = 0;
if (selection < offset)
offset -= 10;
if (offset < 0)
@ -509,13 +506,18 @@ int FileSelector(int type)
}
/* go forward one page */
else if (p & PAD_TRIGGER_R)
else if (p & (PAD_TRIGGER_R | PAD_BUTTON_RIGHT))
{
selection += 10;
if (selection > maxfiles - 1)
selection = offset = 0;
{
selection = maxfiles - 1;
offset = selection - 10 + 1;
}
if ((selection - offset) >= 10)
offset += 10;
if (offset > maxfiles - 10)
offset = maxfiles - 10;
}
/* quit */

View File

@ -3419,7 +3419,7 @@ void mainmenu(void)
gui_menu *m = &menu_main;
/* Update main menu */
if (!m->screenshot && cart.romsize)
if (!m->screenshot)
{
if (config.bg_overlay)
{
@ -3437,6 +3437,9 @@ void mainmenu(void)
bg_list[1].state &= ~IMAGE_VISIBLE;
bg_saves[2].state &= ~IMAGE_VISIBLE;
}
if (cart.romsize)
{
m->screenshot = 128;
m->bg_images[0].state &= ~IMAGE_VISIBLE;
m->items[0].y -= 90;
@ -3464,6 +3467,7 @@ void mainmenu(void)
menu_main.buttons[8].shift[2] = 2;
}
}
}
GUI_InitMenu(m);
GUI_DrawMenuFX(m,10,0);