static void parport_joypad_get_buttons(unsigned port, retro_bits_t *state) { const struct parport_joypad *pad = (const struct parport_joypad*)&parport_pads[port]; if (pad) { BITS_COPY16_PTR(state, pad->buttons); } else BIT256_CLEAR_ALL_PTR(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) { BITS_COPY16_PTR(state, device->buttons); } else BIT256_CLEAR_ALL_PTR(state); }
static void hidpad_nesusb_get_buttons(void *data, retro_bits_t* state) { struct hidpad_nesusb_data *device = (struct hidpad_nesusb_data*)data; if (device) { BITS_COPY16_PTR(state, device->buttons); } else BIT256_CLEAR_ALL_PTR(state); }
static void switch_joypad_get_buttons(unsigned port_num, input_bits_t *state) { if(port_num < MAX_PADS) { BITS_COPY16_PTR(state, pad_state[port_num]); } else { BIT256_CLEAR_ALL_PTR(state); } }
static void ds3_get_buttons(void *data, input_bits_t *state) { ds3_instance_t *pad = (ds3_instance_t *)data; if(pad) { BITS_COPY16_PTR(state, pad->buttons); if(pad->buttons & 0x10000) BIT256_SET_PTR(state, RARCH_MENU_TOGGLE); } else { BIT256_CLEAR_ALL_PTR(state); } }