mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(Apple HID) Cleanups
This commit is contained in:
parent
89105bda56
commit
ff65ad8652
@ -48,12 +48,19 @@ static const char *apple_hid_joypad_name(void *data, unsigned pad)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t apple_hid_joypad_get_buttons(void *data, unsigned port)
|
||||||
|
{
|
||||||
|
apple_hid_t *hid = (apple_hid_t*)data;
|
||||||
|
if (hid)
|
||||||
|
return pad_connection_get_buttons(&hid->slots[port], port);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static bool apple_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
static bool apple_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
apple_hid_t *hid = (apple_hid_t*)data;
|
|
||||||
apple_input_data_t *apple = (apple_input_data_t*)driver->input_data;
|
apple_input_data_t *apple = (apple_input_data_t*)driver->input_data;
|
||||||
uint64_t buttons = hid ? pad_connection_get_buttons(&hid->slots[port], port) : 0;
|
uint64_t buttons = apple_hid_joypad_get_buttons(data, port) : 0;
|
||||||
|
|
||||||
if (!apple || joykey == NO_BTN)
|
if (!apple || joykey == NO_BTN)
|
||||||
return false;
|
return false;
|
||||||
@ -69,12 +76,6 @@ static bool apple_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t apple_hid_joypad_get_buttons(void *data, unsigned port)
|
|
||||||
{
|
|
||||||
apple_hid_t *hid = (apple_hid_t*)data;
|
|
||||||
return pad_connection_get_buttons(&hid->slots[port], port);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool apple_hid_joypad_rumble(void *data, unsigned pad,
|
static bool apple_hid_joypad_rumble(void *data, unsigned pad,
|
||||||
enum retro_rumble_effect effect, uint16_t strength)
|
enum retro_rumble_effect effect, uint16_t strength)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user