Change apple_pad_interface to pad_connection_interface

This commit is contained in:
twinaphex 2014-10-04 18:35:23 +02:00
parent d2cd74a68e
commit 2e4c2fedb2
6 changed files with 11 additions and 8 deletions

View File

@ -53,11 +53,14 @@ typedef struct
struct pad_connection;
struct apple_pad_interface
struct pad_connection_interface
{
void* (*connect)(void *data, uint32_t slot);
void (*disconnect)(void* device);
void (*packet_handler)(void* device, uint8_t *packet, uint16_t size);
void (*set_rumble)(void* device, enum retro_rumble_effect effect,
uint16_t strength);
};

View File

@ -23,7 +23,7 @@
typedef struct
{
bool used;
struct apple_pad_interface* iface;
struct pad_connection_interface *iface;
void* data;
bool is_gcapi;
@ -263,7 +263,7 @@ int32_t apple_joypad_connect(const char* name, void *data)
static const struct
{
const char* name;
struct apple_pad_interface* iface;
struct pad_connection_interface *iface;
} pad_map[] =
{
{ "Nintendo RVL-CNT-01", &apple_pad_wii },

View File

@ -26,7 +26,7 @@
typedef struct
{
bool used;
struct apple_pad_interface* iface;
struct pad_connection_interface *iface;
void* data;
bool is_gcapi;
@ -64,7 +64,7 @@ int32_t apple_joypad_connect(const char* name, void *data)
static const struct
{
const char* name;
struct apple_pad_interface* iface;
struct pad_connection_interface *iface;
} pad_map[] =
{
{ "Nintendo RVL-CNT-01", &apple_pad_wii },

View File

@ -169,7 +169,7 @@ static void hidpad_ps3_set_rumble(void *data,
}
}
struct apple_pad_interface apple_pad_ps3 =
struct pad_connection_interface apple_pad_ps3 =
{
&hidpad_ps3_connect,
&hidpad_ps3_disconnect,

View File

@ -178,7 +178,7 @@ static void hidpad_ps4_set_rumble(void *data,
#endif
}
struct apple_pad_interface apple_pad_ps4 =
struct pad_connection_interface apple_pad_ps4 =
{
&hidpad_ps4_connect,
&hidpad_ps4_disconnect,

View File

@ -116,7 +116,7 @@ static void hidpad_wii_set_rumble(void *data,
(void)strength;
}
struct apple_pad_interface apple_pad_wii =
struct pad_connection_interface apple_pad_wii =
{
&hidpad_wii_connect,
&hidpad_wii_disconnect,