Create special type input_bits_t

This commit is contained in:
twinaphex 2018-04-08 20:21:12 +02:00
parent be1bca4ce4
commit a82bb0ec94
44 changed files with 100 additions and 77 deletions

View File

@ -59,7 +59,7 @@ static void hidpad_nesusb_deinit(void *data)
free(device);
}
static void hidpad_nesusb_get_buttons(void *data, retro_bits_t* state)
static void hidpad_nesusb_get_buttons(void *data, input_bits_t* state)
{
struct hidpad_nesusb_data *device = (struct hidpad_nesusb_data*)data;
if (device)

View File

@ -59,9 +59,11 @@ static void hidpad_ps2adapter_deinit(void *data)
free(device);
}
static void hidpad_ps2adapter_get_buttons(void *data, retro_bits_t *state)
static void hidpad_ps2adapter_get_buttons(void *data, input_bits_t *state)
{
struct hidpad_ps2adapter_data *device = (struct hidpad_ps2adapter_data*)data;
struct hidpad_ps2adapter_data *device = (struct hidpad_ps2adapter_data*)
data;
if (device)
{
BITS_COPY16_PTR(state, device->buttons);

View File

@ -134,7 +134,7 @@ static void hidpad_ps3_deinit(void *data)
free(device);
}
static void hidpad_ps3_get_buttons(void *data, retro_bits_t *state)
static void hidpad_ps3_get_buttons(void *data, input_bits_t *state)
{
struct hidpad_ps3_data *device = (struct hidpad_ps3_data*)data;
if ( device )

View File

@ -185,7 +185,7 @@ static bool hidpad_ps4_check_dpad(struct ps4 *rpt, unsigned id)
return false;
}
static void hidpad_ps4_get_buttons(void *data, retro_bits_t* state)
static void hidpad_ps4_get_buttons(void *data, input_bits_t* state)
{
struct hidpad_ps4_data *device = (struct hidpad_ps4_data*)data;
struct ps4 *rpt = device ?

View File

@ -59,9 +59,11 @@ static void hidpad_psxadapter_deinit(void *data)
free(device);
}
static void hidpad_psxadapter_get_buttons(void *data, retro_bits_t *state)
static void hidpad_psxadapter_get_buttons(void *data, input_bits_t *state)
{
struct hidpad_psxadapter_data *device = (struct hidpad_psxadapter_data*)data;
struct hidpad_psxadapter_data *device = (struct hidpad_psxadapter_data*)
data;
if (device)
{
BITS_COPY16_PTR(state, device->buttons);

View File

@ -60,7 +60,7 @@ static void hidpad_snesusb_deinit(void *data)
free(device);
}
static void hidpad_snesusb_get_buttons(void *data, retro_bits_t *state)
static void hidpad_snesusb_get_buttons(void *data, input_bits_t *state)
{
struct hidpad_snesusb_data *device = (struct hidpad_snesusb_data*)data;
if (device)

View File

@ -672,7 +672,7 @@ static int16_t hidpad_wii_get_axis(void *data, unsigned axis)
return 0;
}
static void hidpad_wii_get_buttons(void *data, retro_bits_t *state)
static void hidpad_wii_get_buttons(void *data, input_bits_t *state)
{
struct connect_wii_wiimote_t* device = (struct connect_wii_wiimote_t*)data;
if ( device )

View File

@ -68,7 +68,7 @@ static void hidpad_wiiugca_deinit(void *data)
free(device);
}
static void hidpad_wiiugca_get_buttons(void *data, retro_bits_t *state)
static void hidpad_wiiugca_get_buttons(void *data, input_bits_t *state)
{
struct hidpad_wiiugca_data *device = (struct hidpad_wiiugca_data*)data;
if (device)

View File

@ -118,7 +118,7 @@ static void hidpad_wiiupro_deinit(void *data)
free(device);
}
static void hidpad_wiiupro_get_buttons(void *data, retro_bits_t *state)
static void hidpad_wiiupro_get_buttons(void *data, input_bits_t *state)
{
struct hidpad_wiiupro_data *device = (struct hidpad_wiiupro_data*)data;
struct wiiupro *rpt = device ?

View File

@ -228,7 +228,8 @@ void pad_connection_packet(joypad_connection_t *joyconn, uint32_t pad,
joyconn->iface->packet_handler(joyconn->data, data, length);
}
void pad_connection_get_buttons(joypad_connection_t *joyconn, unsigned pad, retro_bits_t* state)
void pad_connection_get_buttons(joypad_connection_t *joyconn,
unsigned pad, input_bits_t *state)
{
if (joyconn && joyconn->iface)
joyconn->iface->get_buttons(joyconn->data, state);

View File

@ -58,7 +58,7 @@ typedef struct pad_connection_interface
void (*packet_handler)(void* device, uint8_t *packet, uint16_t size);
void (*set_rumble)(void* device, enum retro_rumble_effect effect,
uint16_t strength);
void (*get_buttons)(void *data, retro_bits_t *state);
void (*get_buttons)(void *data, input_bits_t *state);
int16_t (*get_axis)(void *data, unsigned axis);
const char* (*get_name)(void *data);
} pad_connection_interface_t;
@ -90,7 +90,7 @@ void pad_connection_packet(joypad_connection_t *joyconn,
uint32_t idx, uint8_t* data, uint32_t length);
void pad_connection_get_buttons(joypad_connection_t *joyconn,
unsigned idx, retro_bits_t* state);
unsigned idx, input_bits_t* state);
int16_t pad_connection_get_axis(joypad_connection_t *joyconn,
unsigned idx, unsigned i);

View File

@ -53,7 +53,7 @@ int32_t cocoa_input_find_any_key(void)
}
static int cocoa_input_find_any_button_ret(cocoa_input_data_t *apple,
retro_bits_t * state, unsigned port)
input_bits_t * state, unsigned port)
{
unsigned i;
@ -78,7 +78,7 @@ int32_t cocoa_input_find_any_button(uint32_t port)
if (apple->joypad->get_buttons)
{
retro_bits_t state;
input_bits_t state;
apple->joypad->get_buttons(port,&state);
ret = cocoa_input_find_any_button_ret(apple, &state, port);
}
@ -93,7 +93,7 @@ int32_t cocoa_input_find_any_button(uint32_t port)
if (apple->sec_joypad->get_buttons)
{
retro_bits_t state;
input_bits_t state;
apple->sec_joypad->poll();
apple->sec_joypad->get_buttons(port,&state);
ret = cocoa_input_find_any_button_ret(apple, &state, port);

View File

@ -100,7 +100,7 @@ static int16_t wiiu_pointer_device_state(wiiu_input_t* wiiu, unsigned id)
{
case RETRO_DEVICE_ID_POINTER_PRESSED:
{
retro_bits_t state;
input_bits_t state;
wiiu->joypad->get_buttons(0, &state);
return BIT256_GET(state, VPAD_BUTTON_TOUCH_BIT) ? 1 : 0;
}

View File

@ -1364,7 +1364,8 @@ static const char *btstack_hid_joypad_name(void *data, unsigned pad)
return NULL;
}
static void btstack_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
static void btstack_hid_joypad_get_buttons(void *data, unsigned port,
input_bits_t *state)
{
btstack_hid_t *hid = (btstack_hid_t*)data;
if (hid)
@ -1373,9 +1374,10 @@ static void btstack_hid_joypad_get_buttons(void *data, unsigned port, retro_bits
BIT256_CLEAR_ALL_PTR(state);
}
static bool btstack_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
static bool btstack_hid_joypad_button(void *data,
unsigned port, uint16_t joykey)
{
retro_bits_t buttons;
input_bits_t buttons;
btstack_hid_joypad_get_buttons(data, port, &buttons);
/* Check hat. */

View File

@ -133,7 +133,8 @@ static const char *iohidmanager_hid_joypad_name(void *data, unsigned pad)
return NULL;
}
static void iohidmanager_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
static void iohidmanager_hid_joypad_get_buttons(void *data,
unsigned port, input_bits_t *state)
{
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
if (hid)
@ -145,7 +146,7 @@ static void iohidmanager_hid_joypad_get_buttons(void *data, unsigned port, retro
static bool iohidmanager_hid_joypad_button(void *data,
unsigned port, uint16_t joykey)
{
retro_bits_t buttons;
input_bits_t buttons;
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
unsigned hat_dir = GET_HAT_DIR(joykey);

View File

@ -443,7 +443,8 @@ static const char *libusb_hid_joypad_name(void *data, unsigned pad)
return NULL;
}
static void libusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
static void libusb_hid_joypad_get_buttons(void *data, unsigned port,
input_bits_t *state)
{
libusb_hid_t *hid = (libusb_hid_t*)data;
if (hid)
@ -458,7 +459,7 @@ static void libusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_
static bool libusb_hid_joypad_button(void *data,
unsigned port, uint16_t joykey)
{
retro_bits_t buttons;
input_bits_t buttons;
libusb_hid_joypad_get_buttons(data, port, &buttons);
/* Check hat. */

View File

@ -38,7 +38,8 @@ static const char *null_hid_joypad_name(void *data, unsigned pad)
return NULL;
}
static void null_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
static void null_hid_joypad_get_buttons(void *data,
unsigned port, input_bits_t *state)
{
(void)data;
(void)port;

View File

@ -478,7 +478,8 @@ static bool wiiusb_hid_joypad_query(void *data, unsigned pad)
return pad < MAX_USERS;
}
static void wiiusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
static void wiiusb_hid_joypad_get_buttons(void *data,
unsigned port, input_bits_t *state)
{
wiiusb_hid_t *hid = (wiiusb_hid_t*)data;
if (hid)
@ -489,9 +490,10 @@ static void wiiusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_
BIT256_CLEAR_ALL_PTR(state);
}
static bool wiiusb_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
static bool wiiusb_hid_joypad_button(void *data,
unsigned port, uint16_t joykey)
{
retro_bits_t buttons;
input_bits_t buttons;
wiiusb_hid_joypad_get_buttons(data, port, &buttons);

View File

@ -70,7 +70,7 @@ static bool ctr_joypad_button(unsigned port_num, uint16_t key)
return (pad_state & (1 << key));
}
static void ctr_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
static void ctr_joypad_get_buttons(unsigned port_num, input_bits_t *state)
{
if ( port_num < MAX_PADS )
{

View File

@ -162,7 +162,7 @@ static bool gx_joypad_button(unsigned port, uint16_t key)
return (pad_state[port] & (UINT64_C(1) << key));
}
static void gx_joypad_get_buttons(unsigned port, retro_bits_t *state)
static void gx_joypad_get_buttons(unsigned port, input_bits_t *state)
{
if (port < MAX_PADS)
{

View File

@ -55,7 +55,7 @@ static bool hid_joypad_button(unsigned port, uint16_t joykey)
return false;
}
static void hid_joypad_get_buttons(unsigned port, retro_bits_t *state)
static void hid_joypad_get_buttons(unsigned port, input_bits_t *state)
{
if (generic_hid && generic_hid->get_buttons)
generic_hid->get_buttons((void*)hid_driver_get_data(), port, state);

View File

@ -326,9 +326,11 @@ static bool linuxraw_joypad_button(unsigned port, uint16_t joykey)
return joykey < NUM_BUTTONS && BIT32_GET(pad->buttons, joykey);
}
static void linuxraw_joypad_get_buttons(unsigned port, retro_bits_t *state)
static void linuxraw_joypad_get_buttons(unsigned port, input_bits_t *state)
{
const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*)&linuxraw_pads[port];
const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*)
&linuxraw_pads[port];
if (pad)
{
BITS_COPY16_PTR(state, pad->buttons);

View File

@ -221,7 +221,8 @@ static bool apple_gamecontroller_joypad_button(unsigned port, uint16_t joykey)
return false;
}
static void apple_gamecontroller_joypad_get_buttons(unsigned port, retro_bits_t *state)
static void apple_gamecontroller_joypad_get_buttons(unsigned port,
input_bits_t *state)
{
BITS_COPY16_PTR(state, mfi_buttons[port]);
}

View File

@ -37,7 +37,7 @@ static bool null_joypad_button(unsigned port_num, uint16_t joykey)
return false;
}
static void null_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
static void null_joypad_get_buttons(unsigned port_num, input_bits_t *state)
{
BIT256_CLEAR_ALL_PTR(state);
}

View File

@ -340,9 +340,11 @@ static bool parport_joypad_button(unsigned port, uint16_t joykey)
return joykey < PARPORT_NUM_BUTTONS && BIT32_GET(pad->buttons, joykey);
}
static void parport_joypad_get_buttons(unsigned port, retro_bits_t *state)
static void parport_joypad_get_buttons(unsigned port, input_bits_t *state)
{
const struct parport_joypad *pad = (const struct parport_joypad*)&parport_pads[port];
const struct parport_joypad *pad = (const struct parport_joypad*)
&parport_pads[port];
if (pad)
{
BITS_COPY16_PTR(state, pad->buttons);

View File

@ -68,7 +68,7 @@ static bool ps3_joypad_button(unsigned port_num, uint16_t joykey)
return pad_state[port_num] & (UINT64_C(1) << joykey);
}
static void ps3_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
static void ps3_joypad_get_buttons(unsigned port_num, input_bits_t *state)
{
if (port_num < MAX_PADS)
{

View File

@ -124,7 +124,7 @@ static bool psp_joypad_button(unsigned port_num, uint16_t key)
return (pad_state[port_num] & (UINT64_C(1) << key));
}
static void psp_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
static void psp_joypad_get_buttons(unsigned port_num, input_bits_t *state)
{
if (port_num < PSP_MAX_PADS)
{

View File

@ -130,12 +130,11 @@ static bool rwebpad_joypad_button(unsigned port_num, uint16_t joykey)
return false;
}
static void rwebpad_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
static void rwebpad_joypad_get_buttons(unsigned port_num, input_bits_t *state)
{
EmscriptenGamepadEvent gamepad_state;
EMSCRIPTEN_RESULT r;
r = emscripten_get_gamepad_status(port_num, &gamepad_state);
EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status(
port_num, &gamepad_state);
if (r == EMSCRIPTEN_RESULT_SUCCESS)
{

View File

@ -60,7 +60,7 @@ static bool switch_joypad_button(unsigned port_num, uint16_t key)
return (pad_state[port_num] & (1 << key));
}
static void switch_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
static void switch_joypad_get_buttons(unsigned port_num, input_bits_t *state)
{
if(port_num < MAX_PADS)
{

View File

@ -637,9 +637,11 @@ static bool udev_joypad_button(unsigned port, uint16_t joykey)
return joykey < UDEV_NUM_BUTTONS && BIT64_GET(pad->buttons, joykey);
}
static void udev_joypad_get_buttons(unsigned port, retro_bits_t *state)
static void udev_joypad_get_buttons(unsigned port, input_bits_t *state)
{
const struct udev_joypad *pad = (const struct udev_joypad*)&udev_pads[port];
const struct udev_joypad *pad = (const struct udev_joypad*)
&udev_pads[port];
if (pad)
{
BITS_COPY16_PTR( state, pad->buttons );

View File

@ -26,7 +26,7 @@ static bool wiiu_joypad_init(void *data);
static bool wiiu_joypad_query_pad(unsigned pad);
static void wiiu_joypad_destroy(void);
static bool wiiu_joypad_button(unsigned pad, uint16_t button);
static void wiiu_joypad_get_buttons(unsigned pad, retro_bits_t *state);
static void wiiu_joypad_get_buttons(unsigned pad, input_bits_t *state);
static int16_t wiiu_joypad_axis(unsigned pad, uint32_t axis);
static void wiiu_joypad_poll(void);
static const char *wiiu_joypad_name(unsigned pad);
@ -110,7 +110,7 @@ static bool wiiu_joypad_button(unsigned pad, uint16_t key)
return pad_drivers[pad]->button(pad, key);
}
static void wiiu_joypad_get_buttons(unsigned pad, retro_bits_t *state)
static void wiiu_joypad_get_buttons(unsigned pad, input_bits_t *state)
{
if(!wiiu_joypad_query_pad(pad))
return;

View File

@ -823,7 +823,7 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2)
}
static INLINE bool input_keys_pressed_iterate(unsigned i,
retro_bits_t* p_new_state)
input_bits_t* p_new_state)
{
if ((i >= RARCH_FIRST_META_KEY) &&
BIT64_GET(lifecycle_state, i)
@ -868,7 +868,7 @@ static INLINE bool input_keys_pressed_iterate(unsigned i,
*
* Returns: Input sample containing a mask of all pressed keys.
*/
void input_menu_keys_pressed(void *data, retro_bits_t* p_new_state)
void input_menu_keys_pressed(void *data, input_bits_t *p_new_state)
{
unsigned i, port;
rarch_joypad_info_t joypad_info;
@ -1073,7 +1073,7 @@ int16_t input_driver_input_state(
*
* Returns: Input sample containing a mask of all pressed keys.
*/
void input_keys_pressed(void *data, retro_bits_t* p_new_state)
void input_keys_pressed(void *data, input_bits_t *p_new_state)
{
unsigned i;
rarch_joypad_info_t joypad_info;
@ -1143,7 +1143,7 @@ void input_keys_pressed(void *data, retro_bits_t* p_new_state)
}
}
void input_get_state_for_port(void *data, unsigned port, retro_bits_t* p_new_state)
void input_get_state_for_port(void *data, unsigned port, input_bits_t *p_new_state)
{
unsigned i, j;
int16_t val;

View File

@ -38,6 +38,12 @@
RETRO_BEGIN_DECLS
typedef struct
{
uint32_t data[8];
uint16_t analogs[8];
} input_bits_t;
typedef struct rarch_joypad_driver input_device_driver_t;
typedef struct hid_driver hid_driver_t;
@ -172,7 +178,7 @@ struct rarch_joypad_driver
bool (*query_pad)(unsigned);
void (*destroy)(void);
bool (*button)(unsigned, uint16_t);
void (*get_buttons)(unsigned, retro_bits_t *);
void (*get_buttons)(unsigned, input_bits_t *);
int16_t (*axis)(unsigned, uint32_t);
void (*poll)(void);
bool (*set_rumble)(unsigned, enum retro_rumble_effect, uint16_t);
@ -187,7 +193,7 @@ struct hid_driver
bool (*query_pad)(void *, unsigned);
void (*free)(const void *);
bool (*button)(void *, unsigned, uint16_t);
void (*get_buttons)(void *, unsigned, retro_bits_t *);
void (*get_buttons)(void *, unsigned, input_bits_t *);
int16_t (*axis)(void *, unsigned, uint32_t);
void (*poll)(void *);
bool (*set_rumble)(void *, unsigned, enum retro_rumble_effect, uint16_t);
@ -335,15 +341,15 @@ void input_poll(void);
int16_t input_state(unsigned port, unsigned device,
unsigned idx, unsigned id);
void input_keys_pressed(void *data, retro_bits_t* new_state);
void input_keys_pressed(void *data, input_bits_t* new_state);
#ifdef HAVE_MENU
void input_menu_keys_pressed(void *data, retro_bits_t* new_state);
void input_menu_keys_pressed(void *data, input_bits_t* new_state);
#endif
void *input_driver_get_data(void);
void input_get_state_for_port(void *data, unsigned port, retro_bits_t* p_new_state);
void input_get_state_for_port(void *data, unsigned port, input_bits_t *p_new_state);
const input_driver_t *input_get_ptr(void);

View File

@ -55,7 +55,7 @@ struct input_mapper
/* the whole keyboard state */
uint32_t keys[RETROK_LAST / 32 + 1];
/* This is a bitmask of (1 << key_bind_id). */
retro_bits_t buttons[MAX_USERS];
input_bits_t buttons[MAX_USERS];
};
input_mapper_t *input_mapper_new(void)
@ -85,7 +85,7 @@ void input_mapper_poll(input_mapper_t *handle)
{
int i, j, k;
settings_t *settings = config_get_ptr();
retro_bits_t current_input;
input_bits_t current_input;
unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS));
unsigned device = 0;
unsigned current_button_value;

View File

@ -46,7 +46,7 @@ typedef struct input_overlay_state
int16_t analog[4];
uint32_t keys[RETROK_LAST / 32 + 1];
/* This is a bitmask of (1 << key_bind_id). */
retro_bits_t buttons;
input_bits_t buttons;
} input_overlay_state_t;
struct input_overlay

View File

@ -177,7 +177,7 @@ struct overlay_desc
unsigned retro_key_idx;
/* This is a bit mask of all input binds to set with this overlay control */
retro_bits_t button_mask;
input_bits_t button_mask;
char next_index_name[64];

View File

@ -153,8 +153,6 @@ static INLINE bool bits_any_set(uint32_t* ptr, uint32_t count)
typedef struct
{
uint32_t data[8];
uint16_t analogs[8];
} retro_bits_t;
#endif

View File

@ -139,7 +139,7 @@ void menu_event_kb_set(bool down, enum retro_key key)
* entire button state either but do a separate event per button
* state.
*/
unsigned menu_event(retro_bits_t* p_input, retro_bits_t* p_trigger_input)
unsigned menu_event(input_bits_t *p_input, input_bits_t *p_trigger_input)
{
menu_animation_ctx_delta_t delta;
float delta_time;

View File

@ -44,7 +44,7 @@ RETRO_BEGIN_DECLS
* entire button state either but do a separate event per button
* state.
*/
unsigned menu_event(retro_bits_t* p_input, retro_bits_t* p_trigger_state);
unsigned menu_event(input_bits_t *p_input, input_bits_t *p_trigger_state);
/* Set a specific keyboard key.
*

View File

@ -2381,7 +2381,7 @@ bool runloop_msg_queue_pull(const char **ret)
#ifdef HAVE_MENU
static bool input_driver_toggle_button_combo(
unsigned mode, retro_bits_t* p_input)
unsigned mode, input_bits_t* p_input)
{
switch (mode)
{
@ -2431,9 +2431,9 @@ static enum runloop_state runloop_check_state(
bool input_nonblock_state,
unsigned *sleep_ms)
{
retro_bits_t current_input;
input_bits_t current_input;
#ifdef HAVE_MENU
static retro_bits_t last_input = {{0}};
static input_bits_t last_input = {{0}};
#endif
static bool old_fs_toggle_pressed= false;
static bool old_focus = true;
@ -2599,7 +2599,7 @@ static enum runloop_state runloop_check_state(
#ifdef HAVE_MENU
if (menu_is_alive)
{
static retro_bits_t old_input = {{0}};
static input_bits_t old_input = {{0}};
menu_ctx_iterate_t iter;
retro_ctx.poll_cb();
@ -2607,7 +2607,7 @@ static enum runloop_state runloop_check_state(
{
enum menu_action action;
bool focused = false;
retro_bits_t trigger_input = current_input;
input_bits_t trigger_input = current_input;
bits_clear_bits(trigger_input.data, old_input.data,
ARRAY_SIZE(trigger_input.data));

View File

@ -20,7 +20,7 @@ static bool hidpad_init(void *data);
static bool hidpad_query_pad(unsigned pad);
static void hidpad_destroy(void);
static bool hidpad_button(unsigned pad, uint16_t button);
static void hidpad_get_buttons(unsigned pad, retro_bits_t *state);
static void hidpad_get_buttons(unsigned pad, input_bits_t *state);
static int16_t hidpad_axis(unsigned pad, uint32_t axis);
static void hidpad_poll(void);
static const char *hidpad_name(unsigned pad);
@ -116,7 +116,7 @@ static bool hidpad_button(unsigned pad, uint16_t button)
#endif
}
static void hidpad_get_buttons(unsigned pad, retro_bits_t *state)
static void hidpad_get_buttons(unsigned pad, input_bits_t *state)
{
if (!hidpad_query_pad(pad))
BIT256_CLEAR_ALL_PTR(state);

View File

@ -26,7 +26,7 @@ static bool kpad_init(void *data);
static bool kpad_query_pad(unsigned pad);
static void kpad_destroy(void);
static bool kpad_button(unsigned pad, uint16_t button);
static void kpad_get_buttons(unsigned pad, retro_bits_t *state);
static void kpad_get_buttons(unsigned pad, input_bits_t *state);
static int16_t kpad_axis(unsigned pad, uint32_t axis);
static void kpad_poll(void);
static const char *kpad_name(unsigned pad);
@ -92,7 +92,7 @@ static bool kpad_button(unsigned pad, uint16_t button_bit)
& (UINT64_C(1) << button_bit);
}
static void kpad_get_buttons(unsigned pad, retro_bits_t *state)
static void kpad_get_buttons(unsigned pad, input_bits_t *state)
{
if (!kpad_query_pad(pad))
BIT256_CLEAR_ALL_PTR(state);

View File

@ -38,7 +38,8 @@ static const char *wiiu_hid_joypad_name(void *data, unsigned slot)
return hid->connections[slot].iface->get_name(data);
}
static void wiiu_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
static void wiiu_hid_joypad_get_buttons(void *data, unsigned port,
input_bits_t *state)
{
(void)data;
(void)port;

View File

@ -209,7 +209,7 @@ static bool wpad_button(unsigned pad, uint16_t button_bit)
return button_state & (UINT64_C(1) << button_bit);
}
static void wpad_get_buttons(unsigned pad, retro_bits_t *state)
static void wpad_get_buttons(unsigned pad, input_bits_t *state)
{
if (!wpad_query_pad(pad))
BIT256_CLEAR_ALL_PTR(state);