mirror of
https://github.com/libretro/RetroArch
synced 2025-03-27 05:37:40 +00:00
Keyboard takes prio over joysticks for ANALOG.
Joysticks don't have to rest at 0 so they never allow keyboard to be checked properly.
This commit is contained in:
parent
65c1a1b866
commit
acc8600b0a
@ -323,9 +323,9 @@ static int16_t dinput_input_state(void *data,
|
||||
return dinput_keyboard_pressed(di, id);
|
||||
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
ret = input_joypad_analog(di->joypad, port, index, id, g_settings.input.binds[port]);
|
||||
ret = dinput_pressed_analog(di, binds[port], index, id);
|
||||
if (!ret)
|
||||
dinput_pressed_analog(di, binds[port], index, id);
|
||||
ret = input_joypad_analog(di->joypad, port, index, id, g_settings.input.binds[port]);
|
||||
return ret;
|
||||
|
||||
case RETRO_DEVICE_MOUSE:
|
||||
|
@ -287,9 +287,9 @@ static int16_t linuxraw_input_state(void *data, const struct retro_keybind **bin
|
||||
input_joypad_pressed(linuxraw->joypad, port, binds[port], id);
|
||||
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
ret = input_joypad_analog(linuxraw->joypad, port, index, id, binds[port]);
|
||||
ret = linuxraw_analog_pressed(linuxraw, binds[port], index, id);
|
||||
if (!ret)
|
||||
ret = linuxraw_analog_pressed(linuxraw, binds[port], index, id);
|
||||
ret = input_joypad_analog(linuxraw->joypad, port, index, id, binds[port]);
|
||||
return ret;
|
||||
|
||||
default:
|
||||
|
@ -101,9 +101,9 @@ static int16_t sdl_joypad_device_state(sdl_input_t *sdl, const struct retro_keyb
|
||||
static int16_t sdl_analog_device_state(sdl_input_t *sdl, const struct retro_keybind **binds,
|
||||
unsigned port_num, unsigned index, unsigned id)
|
||||
{
|
||||
int16_t ret = input_joypad_analog(sdl->joypad, port_num, index, id, binds[port_num]);
|
||||
int16_t ret = sdl_analog_pressed(sdl, binds[port_num], index, id);
|
||||
if (!ret)
|
||||
ret = sdl_analog_pressed(sdl, binds[port_num], index, id);
|
||||
ret = input_joypad_analog(sdl->joypad, port_num, index, id, binds[port_num]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -194,9 +194,9 @@ static int16_t x_input_state(void *data, const struct retro_keybind **binds, uns
|
||||
return x_key_pressed(x11, id);
|
||||
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
ret = input_joypad_analog(x11->joypad, port, index, id, binds[port]);
|
||||
ret = x_pressed_analog(x11, binds[port], index, id);
|
||||
if (!ret)
|
||||
ret = x_pressed_analog(x11, binds[port], index, id);
|
||||
ret = input_joypad_analog(x11->joypad, port, index, id, binds[port]);
|
||||
return ret;
|
||||
|
||||
case RETRO_DEVICE_MOUSE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user