mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
After gblues' change, the rest of the button function callbacks
for the other joypad drivers still had int16_t as the return type instead of int32_t - fix this
This commit is contained in:
parent
70ca111a53
commit
bb30dc3dee
@ -27,7 +27,7 @@ static const char *android_joypad_name(unsigned pad)
|
||||
|
||||
static void *android_joypad_init(void *data) { return (void*)-1; }
|
||||
|
||||
static int16_t android_joypad_button_state(
|
||||
static int32_t android_joypad_button_state(
|
||||
struct android_app *android_app,
|
||||
uint8_t *buf,
|
||||
unsigned port, uint16_t joykey)
|
||||
@ -60,7 +60,7 @@ static int16_t android_joypad_button_state(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t android_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t android_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
struct android_app *android_app = (struct android_app*)g_android;
|
||||
uint8_t *buf = android_keyboard_state_get(port);
|
||||
|
@ -58,7 +58,7 @@ static void *ctr_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t ctr_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
static int32_t ctr_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
{
|
||||
if (port_num >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
@ -103,7 +103,7 @@ static BOOL CALLBACK enum_axes_cb(
|
||||
return DIENUM_CONTINUE;
|
||||
}
|
||||
|
||||
static int16_t dinput_joypad_button_state(
|
||||
static int32_t dinput_joypad_button_state(
|
||||
const struct dinput_joypad_data *pad,
|
||||
uint16_t joykey)
|
||||
{
|
||||
@ -229,7 +229,7 @@ static int16_t dinput_joypad_axis_state(
|
||||
return val;
|
||||
}
|
||||
|
||||
static int16_t dinput_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t dinput_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
const struct dinput_joypad_data *pad = &g_pads[port];
|
||||
if (!pad || !pad->joypad)
|
||||
|
@ -160,7 +160,7 @@ static void *dos_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t dos_joypad_button_state(
|
||||
static int32_t dos_joypad_button_state(
|
||||
uint16_t *buf, uint16_t joykey)
|
||||
{
|
||||
switch (key)
|
||||
@ -190,7 +190,7 @@ static int16_t dos_joypad_button_state(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t dos_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
static int32_t dos_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
{
|
||||
uint16_t *buf = dos_keyboard_state_get(port_num);
|
||||
|
||||
|
@ -244,7 +244,7 @@ static void check_port0_active(uint8_t pad_count)
|
||||
}
|
||||
}
|
||||
|
||||
static int16_t gx_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t gx_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
@ -46,7 +46,7 @@ static void hid_joypad_free(void)
|
||||
generic_hid = NULL;
|
||||
}
|
||||
|
||||
static int16_t hid_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t hid_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (generic_hid && generic_hid->button)
|
||||
return generic_hid->button((void*)hid_driver_get_data(), port, joykey);
|
||||
|
@ -302,7 +302,7 @@ static void linuxraw_joypad_destroy(void)
|
||||
linuxraw_hotplug = false;
|
||||
}
|
||||
|
||||
static int16_t linuxraw_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t linuxraw_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*)
|
||||
&linuxraw_pads[port];
|
||||
|
@ -375,7 +375,7 @@ void *apple_gamecontroller_joypad_init(void *data)
|
||||
|
||||
static void apple_gamecontroller_joypad_destroy(void) { }
|
||||
|
||||
static int16_t apple_gamecontroller_joypad_button(
|
||||
static int32_t apple_gamecontroller_joypad_button(
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
|
@ -330,7 +330,7 @@ static void parport_joypad_destroy(void)
|
||||
parport_pads[i].fd = -1;
|
||||
}
|
||||
|
||||
static int16_t parport_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t parport_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
const struct parport_joypad *pad = (const struct parport_joypad*)
|
||||
&parport_pads[port];
|
||||
|
@ -86,7 +86,7 @@ static void *ps2_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t ps2_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t ps2_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
@ -60,7 +60,7 @@ static void *ps3_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t ps3_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t ps3_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
@ -133,7 +133,7 @@ static void *ps4_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t ps4_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t ps4_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (port >= PS4_MAX_ORBISPADS)
|
||||
return 0;
|
||||
|
@ -117,7 +117,7 @@ static void *psp_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t psp_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t psp_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
@ -42,7 +42,7 @@ static void *qnx_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t qnx_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t qnx_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
qnx_input_device_t* controller = NULL;
|
||||
qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data();
|
||||
|
@ -88,7 +88,7 @@ static const char *rwebpad_joypad_name(unsigned pad)
|
||||
return "";
|
||||
}
|
||||
|
||||
static int16_t rwebpad_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t rwebpad_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
EmscriptenGamepadEvent gamepad_state;
|
||||
EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status(
|
||||
|
@ -394,7 +394,7 @@ static bool sdl_dingux_joypad_query_pad(unsigned port)
|
||||
return (port == 0) && joypad->connected;
|
||||
}
|
||||
|
||||
static int16_t sdl_dingux_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t sdl_dingux_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||
|
||||
|
@ -310,7 +310,7 @@ error:
|
||||
#endif
|
||||
}
|
||||
|
||||
static int16_t sdl_joypad_button_state(
|
||||
static int32_t sdl_joypad_button_state(
|
||||
sdl_joypad_t *pad,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
@ -346,7 +346,7 @@ static int16_t sdl_joypad_button_state(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t sdl_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t sdl_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
sdl_joypad_t *pad = (sdl_joypad_t*)&sdl_pads[port];
|
||||
if (!pad || !pad->joypad)
|
||||
|
@ -94,7 +94,7 @@ static void *switch_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t switch_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
static int32_t switch_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
{
|
||||
if (port_num >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
@ -598,7 +598,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int16_t udev_joypad_button_state(
|
||||
static int32_t udev_joypad_button_state(
|
||||
const struct udev_joypad *pad,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
@ -630,7 +630,7 @@ static int16_t udev_joypad_button_state(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t udev_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t udev_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
const struct udev_joypad *pad = (const struct udev_joypad*)
|
||||
&udev_pads[port];
|
||||
|
@ -60,7 +60,7 @@ static void *xdk_joypad_init(void *data)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static int16_t xdk_joypad_button_state(
|
||||
static int32_t xdk_joypad_button_state(
|
||||
XINPUT_GAMEPAD *pad,
|
||||
uint16_t btn_word,
|
||||
unsigned port, uint16_t joykey)
|
||||
@ -119,7 +119,7 @@ static int16_t xdk_joypad_button_state(
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t xdk_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t xdk_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
uint16_t btn_word = 0;
|
||||
XINPUT_GAMEPAD *pad = NULL;
|
||||
|
@ -518,7 +518,7 @@ static void xinput_joypad_destroy(void)
|
||||
}
|
||||
|
||||
|
||||
static int16_t xinput_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t xinput_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
int xuser = PAD_INDEX_TO_XUSER_INDEX(port);
|
||||
xinput_joypad_state *state = &g_xinput_states[xuser];
|
||||
|
@ -273,7 +273,7 @@ static void xinput_joypad_destroy(void)
|
||||
}
|
||||
|
||||
|
||||
static int16_t xinput_joypad_button(unsigned port, uint16_t joykey)
|
||||
static int32_t xinput_joypad_button(unsigned port, uint16_t joykey)
|
||||
{
|
||||
int xuser = pad_index_to_xuser_index(port);
|
||||
uint16_t btn_word = 0;
|
||||
|
@ -53,7 +53,7 @@ static bool load_xinput_dll(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int16_t xinput_joypad_button_state(
|
||||
static int32_t xinput_joypad_button_state(
|
||||
unsigned xuser, uint16_t btn_word,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user