(Wiiu) Buildfix

This commit is contained in:
twinaphex 2020-06-12 07:13:55 +02:00
parent 0e907f01ca
commit 6092de544c

View File

@ -121,30 +121,6 @@ static void wiiu_input_poll(void *data)
wiiu->joypad->poll();
}
static int16_t wiiu_is_pressed(
const input_device_driver_t *joypad,
rarch_joypad_info_t *joypad_info,
const struct retro_keybind *binds,
unsigned port, unsigned id)
{
const struct retro_keybind *bind = &binds[id];
/* Auto-binds are per joypad, not per user. */
const uint64_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 (mouse && winraw_mouse_button_pressed(wr,
mouse, port, bind->mbutton))
return 1;
if ((uint16_t)joykey != NO_BTN &&
joypad->button(joypad_info->joy_idx, (uint16_t)joykey))
return 1;
if (((float)abs(joypad->axis(joypad_info->joy_idx, joyaxis))
/ 0x8000) > joypad_info->axis_threshold)
return 1;
return 0;
}
static int16_t wiiu_input_state(void *data,
rarch_joypad_info_t *joypad_info,
const struct retro_keybind **binds,
@ -167,7 +143,7 @@ static int16_t wiiu_input_state(void *data,
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
{
if (binds[port][i].valid)
if (wiiu_is_pressed(
if (button_is_pressed(
wiiu->joypad,
joypad_info, binds[port], port, i))
ret |= (1 << i);
@ -178,7 +154,7 @@ static int16_t wiiu_input_state(void *data,
else
{
if (binds[port][i].valid)
return wiiu_is_pressed(
return button_is_pressed(
wiiu->joypad,
joypad_info, binds[port], port, id);
}