(RMenu) select_setting - cleanups

This commit is contained in:
twinaphex 2013-03-26 15:26:16 +01:00
parent d58122c655
commit fa80fbf5bb

View File

@ -2322,8 +2322,6 @@ static int select_setting(uint8_t menu_type, uint64_t input)
uint8_t i = 0;
uint8_t j = 0;
uint8_t item_page = 0;
bool pressed_up = false;
bool pressed_down = false;
for(i = first_setting; i < max_settings; i++)
{
@ -2377,11 +2375,8 @@ static int select_setting(uint8_t menu_type, uint64_t input)
driver.video_poke->set_osd_msg(driver.video_data, item.comment, &font_parms);
}
if (!pressed_up)
{
if (input & (1ULL << RMENU_DEVICE_NAV_UP))
{
pressed_up = true;
if (selected == first_setting)
selected = max_settings-1;
else
@ -2392,13 +2387,9 @@ static int select_setting(uint8_t menu_type, uint64_t input)
set_setting_action(menu_type, selected, input);
}
}
if (!pressed_down)
{
if (input & (1ULL << RMENU_DEVICE_NAV_DOWN))
{
pressed_down = true;
selected++;
if (selected >= max_settings)
@ -2408,7 +2399,6 @@ static int select_setting(uint8_t menu_type, uint64_t input)
set_setting_action(menu_type, selected, input);
}
}
/* back to ROM menu if CIRCLE is pressed */
if ((input & (1ULL << RMENU_DEVICE_NAV_L1)) || (input & (1ULL << RMENU_DEVICE_NAV_A)))