static uint64_t libusb_hid_joypad_get_buttons(void *data, unsigned port) { libusb_hid_t *hid = (libusb_hid_t*)data; if (hid) return pad_connection_get_buttons(&hid->slots[port], port); return 0; }
static void btstack_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state) { btstack_hid_t *hid = (btstack_hid_t*)data; if (hid) pad_connection_get_buttons(&hid->slots[port], port, state); else BIT256_CLEAR_ALL_PTR(state); }
static void iohidmanager_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state) { iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; if (hid) return pad_connection_get_buttons(&hid->slots[port], port, state); else BIT256_CLEAR_ALL_PTR(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) { pad_connection_get_buttons(&hid->connections[port], port, state); return; } BIT256_CLEAR_ALL_PTR(state); }
static bool apple_joypad_button(unsigned port, uint16_t joykey) { apple_input_data_t *apple = (apple_input_data_t*)driver.input_data; uint32_t buttons = pad_connection_get_buttons(&slots[port], port); if (!apple || joykey == NO_BTN) return false; // Check hat. if (GET_HAT_DIR(joykey)) return false; // Check the button if ((port < MAX_PLAYERS) && (joykey < 32)) return ((apple->buttons[port] & (1 << joykey)) != 0) || ((buttons & (1 << joykey)) != 0); return false; }
static uint64_t apple_joypad_get_buttons(unsigned port) { return pad_connection_get_buttons(&slots[port], port); }