This commit is contained in:
twinaphex 2020-07-19 03:23:07 +02:00
parent 285b0ec0bb
commit b1a6b35379
2 changed files with 3 additions and 1 deletions

View File

@ -336,7 +336,7 @@ static int16_t parport_joypad_button(unsigned port, uint16_t joykey)
if (port >= DEFAULT_MAX_PADS)
return 0;
if (joykey < PARPORT_NUM_BUTTONS)
return (BIT32_GET(pad->buttons, joykey);
return BIT32_GET(pad->buttons, joykey);
return 0;
}

View File

@ -39,6 +39,8 @@ struct hid_driver
bool (*query_pad)(void *handle, unsigned pad);
void (*free)(const void *handle);
int16_t (*button)(void *handle, unsigned pad, uint16_t button);
int16_t (*state)(void *data, rarch_joypad_info_t *joypad_info,
const struct retro_keybind *binds, unsigned port);
void (*get_buttons)(void *handle, unsigned pad, input_bits_t *state);
int16_t (*axis)(void *handle, unsigned pad, uint32_t axis);
void (*poll)(void *handle);