From 6092de544c313d8aacc05173688d0488c327aa35 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 12 Jun 2020 07:13:55 +0200 Subject: [PATCH] (Wiiu) Buildfix --- input/drivers/wiiu_input.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index 9009510e15..98f9530f48 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -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); }