This commit is contained in:
twinaphex 2017-06-07 01:19:44 +02:00
parent 603d4d0464
commit 59c3f8b06e
2 changed files with 4 additions and 4 deletions

View File

@ -81,11 +81,11 @@ static int16_t linuxraw_analog_pressed(linuxraw_input_t *linuxraw,
input_conv_analog_id_to_bind_id(idx, id, &id_minus, &id_plus);
if ((id_minus < RARCH_BIND_LIST_END) && binds && binds->valid &&
if ((id_minus < RARCH_BIND_LIST_END) && binds->valid &&
linuxraw->state[rarch_keysym_lut[(enum retro_key)binds[id_minus].key]]
)
pressed_minus = -0x7fff;
if ((id_plus < RARCH_BIND_LIST_END) && binds && binds->valid &&
if ((id_plus < RARCH_BIND_LIST_END) && binds->valid &&
linuxraw->state[rarch_keysym_lut[(enum retro_key)binds[id_plus].key]]
)
pressed_plus = 0x7fff;

View File

@ -92,14 +92,14 @@ static int16_t x_pressed_analog(x11_input_t *x11,
sym = rarch_keysym_lut[(enum retro_key)id_minus_key];
keycode = XKeysymToKeycode(x11->display, sym);
if (binds && binds[id_minus].valid
if ( binds[id_minus].valid
&& (id_minus_key < RETROK_LAST)
&& (x11->state[keycode >> 3] & (1 << (keycode & 7))))
pressed_minus = -0x7fff;
sym = rarch_keysym_lut[(enum retro_key)id_plus_key];
keycode = XKeysymToKeycode(x11->display, sym);
if (binds && binds[id_plus].valid
if ( binds[id_plus].valid
&& (id_plus_key < RETROK_LAST)
&& (x11->state[keycode >> 3] & (1 << (keycode & 7))))
pressed_plus = 0x7fff;