mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-02 13:28:35 +00:00
Merge pull request #12764 from gblues/gblues/fix-missing-buttons
WIIU: Fix L3/R3 buttons
This commit is contained in:
commit
80225daee0
@ -327,7 +327,7 @@ static int16_t ds3_get_axis(void *data, unsigned axis)
|
|||||||
|
|
||||||
static const char *ds3_get_name(void *data) { return "Sony DualShock 3"; }
|
static const char *ds3_get_name(void *data) { return "Sony DualShock 3"; }
|
||||||
|
|
||||||
static int16_t ds3_button(void *data, uint16_t joykey)
|
static int32_t ds3_button(void *data, uint16_t joykey)
|
||||||
{
|
{
|
||||||
ds3_instance_t *pad = (ds3_instance_t *)data;
|
ds3_instance_t *pad = (ds3_instance_t *)data;
|
||||||
if (!pad || joykey > 31)
|
if (!pad || joykey > 31)
|
||||||
|
@ -112,7 +112,7 @@ static void ds4_packet_handler(void *data, uint8_t *packet, uint16_t size)
|
|||||||
static void ds4_set_rumble(void *data, enum retro_rumble_effect effect, uint16_t strength) { }
|
static void ds4_set_rumble(void *data, enum retro_rumble_effect effect, uint16_t strength) { }
|
||||||
static int16_t ds4_get_axis(void *data, unsigned axis) { return 0; }
|
static int16_t ds4_get_axis(void *data, unsigned axis) { return 0; }
|
||||||
static const char *ds4_get_name(void *data) { return "Sony DualShock 4"; }
|
static const char *ds4_get_name(void *data) { return "Sony DualShock 4"; }
|
||||||
static int16_t ds4_button(void *data, uint16_t joykey) { return 0; }
|
static int32_t ds4_button(void *data, uint16_t joykey) { return 0; }
|
||||||
static void ds4_pad_deinit(void *data) { }
|
static void ds4_pad_deinit(void *data) { }
|
||||||
static void ds4_get_buttons(void *data, input_bits_t *state) { }
|
static void ds4_get_buttons(void *data, input_bits_t *state) { }
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ static const char *hid_null_get_name(void *data)
|
|||||||
/**
|
/**
|
||||||
* Read the state of a single button.
|
* Read the state of a single button.
|
||||||
*/
|
*/
|
||||||
static int16_t hid_null_button(void *data, uint16_t joykey) { return 0; }
|
static int32_t hid_null_button(void *data, uint16_t joykey) { return 0; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill in the joypad interface
|
* Fill in the joypad interface
|
||||||
|
@ -325,7 +325,7 @@ static const char *wiiu_gca_get_name(void *data)
|
|||||||
* 0x0008 - Y 0x0080 - up 0x0800 - L
|
* 0x0008 - Y 0x0080 - up 0x0800 - L
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int16_t wiiu_gca_button(void *data, uint16_t joykey)
|
static int32_t wiiu_gca_button(void *data, uint16_t joykey)
|
||||||
{
|
{
|
||||||
gca_pad_t *pad = (gca_pad_t *)data;
|
gca_pad_t *pad = (gca_pad_t *)data;
|
||||||
if(!pad || joykey > 31)
|
if(!pad || joykey > 31)
|
||||||
|
@ -73,7 +73,7 @@ typedef struct pad_connection_interface
|
|||||||
void (*get_buttons)(void *data, input_bits_t *state);
|
void (*get_buttons)(void *data, input_bits_t *state);
|
||||||
int16_t (*get_axis)(void *data, unsigned axis);
|
int16_t (*get_axis)(void *data, unsigned axis);
|
||||||
const char* (*get_name)(void *data);
|
const char* (*get_name)(void *data);
|
||||||
int16_t (*button)(void *data, uint16_t joykey);
|
int32_t (*button)(void *data, uint16_t joykey);
|
||||||
} pad_connection_interface_t;
|
} pad_connection_interface_t;
|
||||||
|
|
||||||
extern pad_connection_interface_t pad_connection_wii;
|
extern pad_connection_interface_t pad_connection_wii;
|
||||||
|
@ -56,7 +56,7 @@ static void hidpad_destroy(void)
|
|||||||
hid_deinit(&hid_instance);
|
hid_deinit(&hid_instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16_t hidpad_button(unsigned port, uint16_t joykey)
|
static int32_t hidpad_button(unsigned port, uint16_t joykey)
|
||||||
{
|
{
|
||||||
if (!hidpad_query_pad(port))
|
if (!hidpad_query_pad(port))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -92,7 +92,7 @@ static void kpad_destroy(void)
|
|||||||
kpad_ready = false;
|
kpad_ready = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16_t kpad_button(unsigned port, uint16_t joykey)
|
static int32_t kpad_button(unsigned port, uint16_t joykey)
|
||||||
{
|
{
|
||||||
int channel;
|
int channel;
|
||||||
if (!kpad_query_pad(port))
|
if (!kpad_query_pad(port))
|
||||||
|
@ -277,7 +277,7 @@ static bool wpad_query_pad(unsigned port)
|
|||||||
|
|
||||||
static void wpad_destroy(void) { }
|
static void wpad_destroy(void) { }
|
||||||
|
|
||||||
static int16_t wpad_button(unsigned port, uint16_t joykey)
|
static int32_t wpad_button(unsigned port, uint16_t joykey)
|
||||||
{
|
{
|
||||||
VPADChan channel;
|
VPADChan channel;
|
||||||
if (!wpad_query_pad(port))
|
if (!wpad_query_pad(port))
|
||||||
|
@ -60,7 +60,7 @@ static void wiiu_joypad_destroy(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int16_t wiiu_joypad_button(unsigned port, uint16_t joykey)
|
static int32_t wiiu_joypad_button(unsigned port, uint16_t joykey)
|
||||||
{
|
{
|
||||||
if (!wiiu_joypad_query_pad(port))
|
if (!wiiu_joypad_query_pad(port))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -267,7 +267,7 @@ struct rarch_joypad_driver
|
|||||||
void *(*init)(void *data);
|
void *(*init)(void *data);
|
||||||
bool (*query_pad)(unsigned);
|
bool (*query_pad)(unsigned);
|
||||||
void (*destroy)(void);
|
void (*destroy)(void);
|
||||||
int16_t (*button)(unsigned, uint16_t);
|
int32_t (*button)(unsigned, uint16_t);
|
||||||
int16_t (*state)(rarch_joypad_info_t *joypad_info,
|
int16_t (*state)(rarch_joypad_info_t *joypad_info,
|
||||||
const struct retro_keybind *binds, unsigned port);
|
const struct retro_keybind *binds, unsigned port);
|
||||||
void (*get_buttons)(unsigned, input_bits_t *);
|
void (*get_buttons)(unsigned, input_bits_t *);
|
||||||
|
Loading…
Reference in New Issue
Block a user