From 1d621c412cf3ae8cf1c80878d3491bdca8e823af Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 19 Sep 2019 02:15:18 +0200 Subject: [PATCH] Add HW_RVL to this - won't compile on Gamecube otherwise --- input/drivers_joypad/gx_joypad.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/input/drivers_joypad/gx_joypad.c b/input/drivers_joypad/gx_joypad.c index d560b31a32..0b292f2f11 100644 --- a/input/drivers_joypad/gx_joypad.c +++ b/input/drivers_joypad/gx_joypad.c @@ -134,8 +134,10 @@ static void reset_cb(void) g_menu = true; } -static inline void gx_mouse_info(uint32_t joybutton, unsigned port) { +static inline void gx_mouse_info(uint32_t joybutton, unsigned port) +{ uint8_t i; +#ifdef HW_RVL ir_t ir; /* Get the IR data from the wiimote */ @@ -147,13 +149,15 @@ static inline void gx_mouse_info(uint32_t joybutton, unsigned port) { gx_mouse[port].y = ir.y; } else +#endif { gx_mouse[port].valid = false; } /* reset button state */ gx_mouse[port].mouse_button = 0; - for (i = 0; i < MAX_MOUSEBUTTONS; i++) { + for (i = 0; i < MAX_MOUSEBUTTONS; i++) + { gx_mouse[port].mouse_button |= (joybutton & gx_mousemask[i]) ? (1 << i) : 0; }