mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-13 14:21:08 +00:00
style nits
This commit is contained in:
parent
42e81dcef4
commit
44b70efb68
@ -573,7 +573,7 @@ void hexdump(void *data, int size);
|
||||
void printUUID(uint8_t *uuid);
|
||||
|
||||
/* Deprecated - please use more convenient bd_addr_to_str. */
|
||||
void print_bd_addr( bd_addr_t addr);
|
||||
void print_bd_addr(bd_addr_t addr);
|
||||
|
||||
char * bd_addr_to_str(bd_addr_t addr);
|
||||
|
||||
@ -1365,28 +1365,28 @@ static const char *btstack_hid_joypad_name(void *data, unsigned pad)
|
||||
|
||||
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 {
|
||||
RARCH_INPUT_STATE_CLEAR_PTR( state );
|
||||
}
|
||||
btstack_hid_t *hid = (btstack_hid_t*)data;
|
||||
if (hid)
|
||||
pad_connection_get_buttons(&hid->slots[port], port, state);
|
||||
else
|
||||
RARCH_INPUT_STATE_CLEAR_PTR(state);
|
||||
}
|
||||
}
|
||||
|
||||
static bool btstack_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
btstack_hid_joypad_get_buttons(data, port, &buttons);
|
||||
retro_bits_t buttons;
|
||||
btstack_hid_joypad_get_buttons(data, port, &buttons);
|
||||
|
||||
/* Check hat. */
|
||||
if (GET_HAT_DIR(joykey))
|
||||
return false;
|
||||
/* Check hat. */
|
||||
if (GET_HAT_DIR(joykey))
|
||||
return false;
|
||||
|
||||
/* Check the button. */
|
||||
if ((port < MAX_USERS) && (joykey < 32))
|
||||
return ( RARCH_INPUT_STATE_BIT_GET( buttons, joykey ) != 0 );
|
||||
/* Check the button. */
|
||||
if ((port < MAX_USERS) && (joykey < 32))
|
||||
return (RARCH_INPUT_STATE_BIT_GET(buttons, joykey) != 0);
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool btstack_hid_joypad_rumble(void *data, unsigned pad,
|
||||
|
@ -110,22 +110,21 @@ static const char *iohidmanager_hid_joypad_name(void *data, unsigned pad)
|
||||
|
||||
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 {
|
||||
RARCH_INPUT_STATE_CLEAR_PTR( state );
|
||||
}
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
|
||||
if (hid)
|
||||
return pad_connection_get_buttons(&hid->slots[port], port, state);
|
||||
else
|
||||
RARCH_INPUT_STATE_CLEAR_PTR(state);
|
||||
}
|
||||
|
||||
static bool iohidmanager_hid_joypad_button(void *data,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
|
||||
unsigned hat_dir = GET_HAT_DIR(joykey);
|
||||
retro_bits_t buttons;
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
|
||||
unsigned hat_dir = GET_HAT_DIR(joykey);
|
||||
|
||||
iohidmanager_hid_joypad_get_buttons(data, port, &buttons);
|
||||
iohidmanager_hid_joypad_get_buttons(data, port, &buttons);
|
||||
|
||||
/* Check hat. */
|
||||
if (hat_dir)
|
||||
@ -151,7 +150,7 @@ static bool iohidmanager_hid_joypad_button(void *data,
|
||||
|
||||
/* Check the button. */
|
||||
if ((port < MAX_USERS) && (joykey < 32))
|
||||
return (RARCH_INPUT_STATE_BIT_GET( buttons, joykey ) != 0)
|
||||
return (RARCH_INPUT_STATE_BIT_GET(buttons, joykey) != 0)
|
||||
|| ((hid->buttons[port] & (1 << joykey)) != 0);
|
||||
|
||||
return false;
|
||||
|
@ -64,7 +64,7 @@ struct wiiusb_adapter
|
||||
int32_t slot;
|
||||
uint8_t *data;
|
||||
|
||||
uint8_t send_control_type;
|
||||
uint8_t send_control_type;
|
||||
uint8_t *send_control_buffer;
|
||||
uint32_t send_control_size;
|
||||
};
|
||||
@ -113,10 +113,10 @@ static int32_t wiiusb_hid_read_cb(int32_t size, void *data)
|
||||
pad_connection_packet(&hid->connections[adapter->slot],
|
||||
adapter->slot, adapter->data-1, size+1);
|
||||
|
||||
if (adapter)
|
||||
if (adapter)
|
||||
adapter->busy = false;
|
||||
|
||||
return size;
|
||||
return size;
|
||||
}
|
||||
|
||||
static void wiiusb_hid_device_send_control(void *data,
|
||||
@ -398,7 +398,7 @@ static void wiiusb_hid_scan_for_devices(wiiusb_hid_t *hid)
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
/* first check the device is not already in our list */
|
||||
/* first check the device is not already in our list */
|
||||
if (!wiiusb_hid_new_device(hid, dev_entries[i].device_id))
|
||||
continue;
|
||||
|
||||
@ -461,11 +461,11 @@ static int wiiusb_hid_change_cb(int result, void *usrdata)
|
||||
return -1;
|
||||
|
||||
/* As it's not coming from the removal callback
|
||||
then we detected a new device being inserted */
|
||||
if (!hid->removal_cb)
|
||||
hid->device_detected = true;
|
||||
else
|
||||
hid->removal_cb = false;
|
||||
then we detected a new device being inserted */
|
||||
if (!hid->removal_cb)
|
||||
hid->device_detected = true;
|
||||
else
|
||||
hid->removal_cb = false;
|
||||
|
||||
/* Re-submit the change alert */
|
||||
USB_DeviceChangeNotifyAsync(USB_CLASS_HID, wiiusb_hid_change_cb, usrdata);
|
||||
@ -480,35 +480,34 @@ static bool wiiusb_hid_joypad_query(void *data, unsigned pad)
|
||||
|
||||
static void wiiusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
|
||||
{
|
||||
wiiusb_hid_t *hid = (wiiusb_hid_t*)data;
|
||||
if (hid) {
|
||||
return pad_connection_get_buttons(&hid->connections[port], port, state);
|
||||
} else {
|
||||
RARCH_INPUT_STATE_CLEAR_PTR( state );
|
||||
}
|
||||
wiiusb_hid_t *hid = (wiiusb_hid_t*)data;
|
||||
if (hid)
|
||||
return pad_connection_get_buttons(&hid->connections[port], port, state);
|
||||
else
|
||||
RARCH_INPUT_STATE_CLEAR_PTR(state);
|
||||
}
|
||||
|
||||
static bool wiiusb_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
retro_bits_t buttons;
|
||||
|
||||
wiiusb_hid_joypad_get_buttons(data, port, &buttons);
|
||||
wiiusb_hid_joypad_get_buttons(data, port, &buttons);
|
||||
|
||||
/* Check hat. */
|
||||
if (GET_HAT_DIR(joykey))
|
||||
return false;
|
||||
/* Check hat. */
|
||||
if (GET_HAT_DIR(joykey))
|
||||
return false;
|
||||
|
||||
/* Check the button. */
|
||||
if ((port < MAX_USERS) && (joykey < 32))
|
||||
return (RARCH_INPUT_STATE_BIT_GET(buttons, joykey)) != 0);
|
||||
/* Check the button. */
|
||||
if ((port < MAX_USERS) && (joykey < 32))
|
||||
return (RARCH_INPUT_STATE_BIT_GET(buttons, joykey)) != 0);
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool wiiusb_hid_joypad_rumble(void *data, unsigned pad,
|
||||
enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
wiiusb_hid_t *hid = (wiiusb_hid_t*)data;
|
||||
wiiusb_hid_t *hid = (wiiusb_hid_t*)data;
|
||||
|
||||
if (!hid)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user