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:
if (binds[port])
{
int16_t ret = input_joypad_analog(di->joypad, joypad_info,
port, idx, id, binds[port]);
int16_t ret = dinput_pressed_analog(di, binds[port], idx, id);
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;
}
break;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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