don't always clear poll state
This commit is contained in:
parent
5ef595be1a
commit
1f8a85615c
|
@ -121,8 +121,6 @@ static void rwebpad_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||||
EmscriptenGamepadEvent gamepad_state;
|
EmscriptenGamepadEvent gamepad_state;
|
||||||
EMSCRIPTEN_RESULT r;
|
EMSCRIPTEN_RESULT r;
|
||||||
|
|
||||||
BIT256_CLEAR_ALL_PTR(state);
|
|
||||||
|
|
||||||
r = emscripten_get_gamepad_status(port_num, &gamepad_state);
|
r = emscripten_get_gamepad_status(port_num, &gamepad_state);
|
||||||
|
|
||||||
if (r == EMSCRIPTEN_RESULT_SUCCESS)
|
if (r == EMSCRIPTEN_RESULT_SUCCESS)
|
||||||
|
@ -135,6 +133,8 @@ static void rwebpad_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||||
BIT256_SET_PTR(state, i);
|
BIT256_SET_PTR(state, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
BIT256_CLEAR_ALL_PTR(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16_t rwebpad_joypad_axis(unsigned port_num, uint32_t joyaxis)
|
static int16_t rwebpad_joypad_axis(unsigned port_num, uint32_t joyaxis)
|
||||||
|
|
Loading…
Reference in New Issue