mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
i(dinput/winraw/x11) Fix issue pointed out in PR #15026
This commit is contained in:
parent
6622cbb69d
commit
3f485de88c
@ -814,7 +814,7 @@ static int16_t dinput_input_state(
|
||||
const uint64_t bind_joyaxis = input_config_binds[port][new_id].joyaxis;
|
||||
const uint64_t autobind_joykey = input_autoconf_binds[port][new_id].joykey;
|
||||
const uint64_t autobind_joyaxis= input_autoconf_binds[port][new_id].joyaxis;
|
||||
uint16_t port = joypad_info->joy_idx;
|
||||
uint16_t joyport = joypad_info->joy_idx;
|
||||
float axis_threshold = joypad_info->axis_threshold;
|
||||
const uint64_t joykey = (bind_joykey != NO_BTN)
|
||||
? bind_joykey : autobind_joykey;
|
||||
@ -823,10 +823,10 @@ static int16_t dinput_input_state(
|
||||
if (binds[port][new_id].valid)
|
||||
{
|
||||
if ((uint16_t)joykey != NO_BTN && joypad->button(
|
||||
port, (uint16_t)joykey))
|
||||
joyport, (uint16_t)joykey))
|
||||
return 1;
|
||||
if (joyaxis != AXIS_NONE &&
|
||||
((float)abs(joypad->axis(port, joyaxis))
|
||||
((float)abs(joypad->axis(joyport, joyaxis))
|
||||
/ 0x8000) > axis_threshold)
|
||||
return 1;
|
||||
else if (
|
||||
|
@ -989,7 +989,7 @@ static int16_t winraw_input_state(
|
||||
const uint64_t bind_joyaxis = input_config_binds[port][new_id].joyaxis;
|
||||
const uint64_t autobind_joykey = input_autoconf_binds[port][new_id].joykey;
|
||||
const uint64_t autobind_joyaxis= input_autoconf_binds[port][new_id].joyaxis;
|
||||
uint16_t port = joypad_info->joy_idx;
|
||||
uint16_t joyport = joypad_info->joy_idx;
|
||||
float axis_threshold = joypad_info->axis_threshold;
|
||||
const uint64_t joykey = (bind_joykey != NO_BTN)
|
||||
? bind_joykey : autobind_joykey;
|
||||
@ -998,10 +998,10 @@ static int16_t winraw_input_state(
|
||||
if (binds[port][new_id].valid)
|
||||
{
|
||||
if ((uint16_t)joykey != NO_BTN && joypad->button(
|
||||
port, (uint16_t)joykey))
|
||||
joyport, (uint16_t)joykey))
|
||||
return 1;
|
||||
if (joyaxis != AXIS_NONE &&
|
||||
((float)abs(joypad->axis(port, joyaxis))
|
||||
((float)abs(joypad->axis(joyport, joyaxis))
|
||||
/ 0x8000) > axis_threshold)
|
||||
return 1;
|
||||
else if (
|
||||
|
@ -389,7 +389,7 @@ static int16_t x_input_state(
|
||||
const uint64_t bind_joyaxis = input_config_binds[port][new_id].joyaxis;
|
||||
const uint64_t autobind_joykey = input_autoconf_binds[port][new_id].joykey;
|
||||
const uint64_t autobind_joyaxis= input_autoconf_binds[port][new_id].joyaxis;
|
||||
uint16_t port = joypad_info->joy_idx;
|
||||
uint16_t joyport = joypad_info->joy_idx;
|
||||
float axis_threshold = joypad_info->axis_threshold;
|
||||
const uint64_t joykey = (bind_joykey != NO_BTN)
|
||||
? bind_joykey : autobind_joykey;
|
||||
@ -403,10 +403,10 @@ static int16_t x_input_state(
|
||||
if (binds[port][new_id].valid)
|
||||
{
|
||||
if ((uint16_t)joykey != NO_BTN && joypad->button(
|
||||
port, (uint16_t)joykey))
|
||||
joyport, (uint16_t)joykey))
|
||||
return 1;
|
||||
if (joyaxis != AXIS_NONE &&
|
||||
((float)abs(joypad->axis(port, joyaxis))
|
||||
((float)abs(joypad->axis(joyport, joyaxis))
|
||||
/ 0x8000) > axis_threshold)
|
||||
return 1;
|
||||
else if (settings->uints.input_mouse_index[port] == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user