Potential fix for #10884

This commit is contained in:
twinaphex 2020-06-22 20:34:40 +02:00
parent dd966ba58f
commit 35c55c4b50
7 changed files with 25 additions and 24 deletions

View File

@ -635,10 +635,10 @@ static int16_t dinput_input_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog(di->joypad, joypad_info, int16_t ret = dinput_pressed_analog(di, binds[port], idx, id);
port, idx, id, binds[port]);
if (!ret) if (!ret)
ret = dinput_pressed_analog(di, binds[port], idx, id); ret = input_joypad_analog(di->joypad, joypad_info,
port, idx, id, binds[port]);
return ret; return ret;
} }
break; break;

View File

@ -163,10 +163,11 @@ static int16_t linuxraw_input_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog(linuxraw->joypad, int16_t ret = linuxraw_analog_pressed(
joypad_info, port, idx, id, binds[port]); linuxraw, binds[port], idx, id);
if (!ret) if (!ret)
ret = linuxraw_analog_pressed(linuxraw, binds[port], idx, id); ret = input_joypad_analog(linuxraw->joypad,
joypad_info, port, idx, id, binds[port]);
return ret; return ret;
} }
} }

View File

@ -567,13 +567,13 @@ static int16_t rwebinput_input_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog( int16_t ret = rwebinput_analog_pressed(
rwebinput->joypad, joypad_info, port,
idx, id, binds[port]);
if (!ret)
ret = rwebinput_analog_pressed(
rwebinput, joypad_info, binds[port], rwebinput, joypad_info, binds[port],
idx, id); idx, id);
if (!ret)
ret = input_joypad_analog(
rwebinput->joypad, joypad_info, port,
idx, id, binds[port]);
return ret; return ret;
} }
case RETRO_DEVICE_KEYBOARD: case RETRO_DEVICE_KEYBOARD:

View File

@ -236,10 +236,10 @@ static int16_t sdl_input_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog(sdl->joypad, int16_t ret = sdl_analog_pressed(sdl, binds[port], idx, id);
joypad_info, port, idx, id, binds[port]);
if (!ret) if (!ret)
ret = sdl_analog_pressed(sdl, binds[port], idx, id); ret = input_joypad_analog(sdl->joypad,
joypad_info, port, idx, id, binds[port]);
return ret; return ret;
} }
break; break;

View File

@ -1050,10 +1050,10 @@ static int16_t udev_input_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog(udev->joypad, int16_t ret = udev_analog_pressed(binds[port], idx, id);
joypad_info, port, idx, id, binds[port]);
if (!ret) if (!ret)
ret = udev_analog_pressed(binds[port], idx, id); ret = input_joypad_analog(udev->joypad,
joypad_info, port, idx, id, binds[port]);
return ret; return ret;
} }
case RETRO_DEVICE_KEYBOARD: case RETRO_DEVICE_KEYBOARD:

View File

@ -335,10 +335,10 @@ static int16_t input_wl_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog( int16_t ret = input_wl_analog_pressed(wl, binds[port], idx, id);
wl->joypad, joypad_info, port, idx, id, binds[port]);
if (!ret) if (!ret)
ret = input_wl_analog_pressed(wl, binds[port], idx, id); ret = input_joypad_analog(
wl->joypad, joypad_info, port, idx, id, binds[port]);
return ret; return ret;
} }
break; break;

View File

@ -353,11 +353,11 @@ static int16_t x_input_state(void *data,
case RETRO_DEVICE_ANALOG: case RETRO_DEVICE_ANALOG:
if (binds[port]) if (binds[port])
{ {
int16_t ret = input_joypad_analog(x11->joypad, joypad_info, int16_t ret = x_pressed_analog(x11, binds[port], idx, id);
if (!ret)
ret = input_joypad_analog(x11->joypad, joypad_info,
port, idx, port, idx,
id, binds[port]); id, binds[port]);
if (!ret)
ret = x_pressed_analog(x11, binds[port], idx, id);
return ret; return ret;
} }
case RETRO_DEVICE_KEYBOARD: case RETRO_DEVICE_KEYBOARD: