mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 13:14:04 +00:00
(dinput) Buildfix
This commit is contained in:
parent
650c0e7e0a
commit
ff0ea2921f
@ -328,10 +328,19 @@ static bool dinput_is_pressed(struct dinput_input *di,
|
||||
|
||||
if (binds && binds[id].valid)
|
||||
{
|
||||
if (dinput_mouse_button_pressed(di, port, bind->mbutton))
|
||||
return true;
|
||||
if (input_joypad_pressed(di->joypad, joypad_info, port, binds, id))
|
||||
return true;
|
||||
/* Auto-binds are per joypad, not per user. */
|
||||
const uint16_t joykey = (binds[id].joykey != NO_BTN)
|
||||
? binds[id].joykey : joypad_info.auto_binds[id].joykey;
|
||||
const uint32_t joyaxis = (binds[id].joyaxis != AXIS_NONE)
|
||||
? binds[id].joyaxis : joypad_info.auto_binds[id].joyaxis;
|
||||
|
||||
if (dinput_mouse_button_pressed(di, port, binds[id].mbutton))
|
||||
return true;
|
||||
if (joykey != NO_BTN
|
||||
&& di->joypad->button(joypad_info.joy_idx, joykey))
|
||||
return true;
|
||||
if (((float)abs(di->joypad->axis(joypad_info.joy_idx, joyaxis)) / 0x8000) > joypad_info.axis_threshold)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user