From e53840f6c11bf43d06f3d740d4c38dd2b5be1a34 Mon Sep 17 00:00:00 2001 From: Ernesto Ramirez Date: Sat, 2 Jan 2016 18:37:15 -0600 Subject: [PATCH] (GX) Fix input issue causing controllers to do not work at all. --- input/drivers_joypad/gx_joypad.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/input/drivers_joypad/gx_joypad.c b/input/drivers_joypad/gx_joypad.c index 0588ef56c9..d9671397bc 100644 --- a/input/drivers_joypad/gx_joypad.c +++ b/input/drivers_joypad/gx_joypad.c @@ -314,9 +314,9 @@ static int16_t WPAD_StickY(WPADData *data, u8 right) static void gx_joypad_poll(void) { unsigned i, j, port; - uint64_t *state_p1 = NULL; - uint8_t gcpad = 0; - bool check_menu_toggle = false; + uint8_t gcpad = 0; + uint64_t state_p1; + uint64_t check_menu_toggle; pad_state[0] = 0; pad_state[1] = 0; @@ -446,22 +446,21 @@ static void gx_joypad_poll(void) analog_state[port][i][j] = -0x7fff; } - state_p1 = &pad_state[0]; + state_p1 = pad_state[0]; BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE); if (g_menu) { - *state_p1 |= (UINT64_C(1) << GX_GC_HOME); + state_p1 |= (UINT64_C(1) << GX_GC_HOME); g_menu = false; } - check_menu_toggle = (*state_p1 & (UINT64_C(1) << GX_GC_HOME)); + check_menu_toggle = UINT64_C(1) << GX_GC_HOME; #ifdef HW_RVL - check_menu_toggle = (check_menu_toggle| (UINT64_C(1) << GX_WIIMOTE_HOME) - | (UINT64_C(1) << GX_CLASSIC_HOME)); + check_menu_toggle |= (UINT64_C(1) << GX_WIIMOTE_HOME) | (UINT64_C(1) << GX_CLASSIC_HOME); #endif - if (check_menu_toggle) + if (check_menu_toggle & state_p1) BIT64_SET(lifecycle_state, RARCH_MENU_TOGGLE); }