Fixed bug with page up/down

This commit is contained in:
fabio.olimpieri 2014-01-11 11:17:49 +00:00
parent eb05f6ba2d
commit 37b6f606e2
2 changed files with 4 additions and 3 deletions

View File

@ -73,7 +73,7 @@ static const char *input_messages[] = {
/*11*/ " ",
/*12*/ "Mouse emulation",
/*13*/ "^|On|Off",
NULL,
NULL
};
static const char *hardware_messages[] = {

View File

@ -567,6 +567,7 @@ static void select_next(menu_t *p_menu, int dx, int dy, int cicle)
p_menu->cur_sel = get_next_seq_y(p_menu, p_menu->cur_sel, dy, cicle);
next = get_next_seq_y(p_menu, p_menu->cur_sel, dy + 1, cicle);
if (IS_SUBMENU(p_menu->pp_msgs[p_menu->cur_sel])&&(dy!=1)&&(dy!=-1)) p_menu->cur_sel--;
if (p_menu->pp_msgs[p_menu->cur_sel][0] == ' ' ||
p_menu->pp_msgs[p_menu->cur_sel][0] == '#' ||
IS_SUBMENU(p_menu->pp_msgs[p_menu->cur_sel]) )
@ -734,8 +735,8 @@ uint32_t menu_wait_key_press(void)
if (SDL_JoystickGetButton(joy, 5) != 0 || /* + */
SDL_JoystickGetButton(joy, 18) != 0) /* C+ */
keys |= KEY_PAGEUP;
if (SDL_JoystickGetButton(joy, 4) != 0 || /* + */
SDL_JoystickGetButton(joy, 17) != 0) /* C+ */
if (SDL_JoystickGetButton(joy, 4) != 0 || /* - */
SDL_JoystickGetButton(joy, 17) != 0) /* C- */
keys |= KEY_PAGEDOWN;
}
joy_keys_changed = keys != joy_keys_last;