mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Rename rarch_joypad_driver_t to input_device_driver_t
This commit is contained in:
parent
baaed5a241
commit
8c6cce3945
@ -89,7 +89,7 @@ typedef struct android_input
|
||||
unsigned pointer_count;
|
||||
ASensorManager *sensorManager;
|
||||
ASensorEventQueue *sensorEventQueue;
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} android_input_t;
|
||||
|
||||
static void frontend_android_get_version_sdk(int32_t *sdk);
|
||||
@ -866,7 +866,7 @@ static float android_input_get_sensor_input(void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *android_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *android_input_get_joypad_driver(void *data)
|
||||
{
|
||||
android_input_t *android = (android_input_t*)data;
|
||||
if (!android)
|
||||
|
@ -414,7 +414,7 @@ static void apple_input_grab_mouse(void *data, bool state)
|
||||
(void)state;
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *apple_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *apple_input_get_joypad_driver(void *data)
|
||||
{
|
||||
apple_input_data_t *apple = (apple_input_data_t*)data;
|
||||
|
||||
|
@ -57,7 +57,7 @@ typedef struct
|
||||
bool small_keyboard_active;
|
||||
uint32_t icade_buttons;
|
||||
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} apple_input_data_t;
|
||||
|
||||
void apple_input_enable_icade(bool on);
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
typedef struct ctr_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} ctr_input_t;
|
||||
|
||||
static void ctr_input_poll(void *data)
|
||||
@ -96,7 +96,7 @@ static uint64_t ctr_input_get_capabilities(void *data)
|
||||
return (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *ctr_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *ctr_input_get_joypad_driver(void *data)
|
||||
{
|
||||
ctr_input_t *ctr = (ctr_input_t*)data;
|
||||
if (ctr)
|
||||
|
@ -62,7 +62,7 @@ struct dinput_input
|
||||
{
|
||||
LPDIRECTINPUTDEVICE8 keyboard;
|
||||
LPDIRECTINPUTDEVICE8 mouse;
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
uint8_t state[256];
|
||||
|
||||
int mouse_rel_x;
|
||||
@ -651,7 +651,7 @@ static bool dinput_set_rumble(void *data, unsigned port,
|
||||
return input_joypad_set_rumble(di->joypad, port, effect, strength);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *dinput_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *dinput_get_joypad_driver(void *data)
|
||||
{
|
||||
struct dinput_input *di = (struct dinput_input*)data;
|
||||
if (!di)
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
typedef struct gx_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} gx_input_t;
|
||||
|
||||
static int16_t gx_input_state(void *data, const struct retro_keybind **binds,
|
||||
@ -104,7 +104,7 @@ static uint64_t gx_input_get_capabilities(void *data)
|
||||
return (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *gx_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *gx_input_get_joypad_driver(void *data)
|
||||
{
|
||||
gx_input_t *gx = (gx_input_t*)data;
|
||||
if (!gx)
|
||||
|
@ -32,7 +32,7 @@ static struct termios oldTerm, newTerm;
|
||||
|
||||
typedef struct linuxraw_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
bool state[0x80];
|
||||
} linuxraw_input_t;
|
||||
|
||||
@ -218,7 +218,7 @@ static bool linuxraw_set_rumble(void *data, unsigned port,
|
||||
return input_joypad_set_rumble(linuxraw->joypad, port, effect, strength);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *linuxraw_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *linuxraw_get_joypad_driver(void *data)
|
||||
{
|
||||
linuxraw_input_t *linuxraw = (linuxraw_input_t*)data;
|
||||
if (!linuxraw)
|
||||
|
@ -48,7 +48,7 @@ typedef struct ps3_input
|
||||
#ifdef HAVE_MOUSE
|
||||
unsigned mice_connected;
|
||||
#endif
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} ps3_input_t;
|
||||
|
||||
static void ps3_input_poll(void *data)
|
||||
@ -233,7 +233,7 @@ static bool ps3_input_set_rumble(void *data, unsigned port,
|
||||
return false;
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *ps3_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *ps3_input_get_joypad_driver(void *data)
|
||||
{
|
||||
ps3_input_t *ps3 = (ps3_input_t*)data;
|
||||
if (ps3)
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
typedef struct psp_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} psp_input_t;
|
||||
|
||||
static void psp_input_poll(void *data)
|
||||
@ -109,7 +109,7 @@ static uint64_t psp_input_get_capabilities(void *data)
|
||||
return (1 << RETRO_DEVICE_JOYPAD) | (1 << RETRO_DEVICE_ANALOG);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *psp_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *psp_input_get_joypad_driver(void *data)
|
||||
{
|
||||
psp_input_t *psp = (psp_input_t*)data;
|
||||
if (psp)
|
||||
|
@ -75,7 +75,7 @@ typedef struct qnx_input
|
||||
*/
|
||||
qnx_input_device_t *port_device[MAX_PADS];
|
||||
qnx_input_device_t devices[MAX_PADS];
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
int16_t analog_state[MAX_PADS][2][2];
|
||||
uint64_t pad_state[MAX_PADS];
|
||||
} qnx_input_t;
|
||||
@ -816,7 +816,7 @@ static uint64_t qnx_input_get_capabilities(void *data)
|
||||
return caps;
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *qnx_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *qnx_input_get_joypad_driver(void *data)
|
||||
{
|
||||
qnx_input_t *qnx = (qnx_input_t*)data;
|
||||
return qnx->joypad;
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
typedef struct sdl_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
|
||||
int mouse_x, mouse_y;
|
||||
int mouse_abs_x, mouse_abs_y;
|
||||
@ -290,7 +290,7 @@ static bool sdl_set_rumble(void *data, unsigned port,
|
||||
return input_joypad_set_rumble(sdl->joypad, port, effect, strength);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *sdl_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *sdl_get_joypad_driver(void *data)
|
||||
{
|
||||
sdl_input_t *sdl = (sdl_input_t*)data;
|
||||
if (!sdl)
|
||||
|
@ -90,7 +90,7 @@ struct udev_input
|
||||
uint16_t *mod_map_bit;
|
||||
#endif
|
||||
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
uint8_t key_state[(KEY_MAX + 7) / 8];
|
||||
|
||||
int epfd;
|
||||
@ -855,7 +855,7 @@ static bool udev_input_set_rumble(void *data, unsigned port, enum retro_rumble_e
|
||||
return false;
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *udev_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *udev_input_get_joypad_driver(void *data)
|
||||
{
|
||||
udev_input_t *udev = (udev_input_t*)data;
|
||||
if (!udev)
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
typedef struct x11_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
|
||||
Display *display;
|
||||
Window win;
|
||||
@ -362,7 +362,7 @@ static bool x_set_rumble(void *data, unsigned port,
|
||||
return input_joypad_set_rumble(x11->joypad, port, effect, strength);
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *x_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *x_get_joypad_driver(void *data)
|
||||
{
|
||||
x11_input_t *x11 = (x11_input_t*)data;
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
typedef struct xdk_input
|
||||
{
|
||||
const rarch_joypad_driver_t *joypad;
|
||||
const input_device_driver_t *joypad;
|
||||
} xdk_input_t;
|
||||
|
||||
static void xdk_input_poll(void *data)
|
||||
@ -137,7 +137,7 @@ static bool xdk_input_set_rumble(void *data, unsigned port,
|
||||
return val;
|
||||
}
|
||||
|
||||
static const rarch_joypad_driver_t *xdk_input_get_joypad_driver(void *data)
|
||||
static const input_device_driver_t *xdk_input_get_joypad_driver(void *data)
|
||||
{
|
||||
xdk_input_t *xdk = (xdk_input_t*)data;
|
||||
if (!xdk)
|
||||
|
@ -142,7 +142,7 @@ static void android_joypad_destroy(void)
|
||||
{
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t android_joypad = {
|
||||
input_device_driver_t android_joypad = {
|
||||
android_joypad_init,
|
||||
android_joypad_query_pad,
|
||||
android_joypad_destroy,
|
||||
|
@ -179,7 +179,7 @@ static void ctr_joypad_destroy(void)
|
||||
{
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t ctr_joypad = {
|
||||
input_device_driver_t ctr_joypad = {
|
||||
ctr_joypad_init,
|
||||
ctr_joypad_query_pad,
|
||||
ctr_joypad_destroy,
|
||||
|
@ -412,7 +412,7 @@ static bool dinput_joypad_query_pad(unsigned pad)
|
||||
}
|
||||
|
||||
|
||||
rarch_joypad_driver_t dinput_joypad = {
|
||||
input_device_driver_t dinput_joypad = {
|
||||
dinput_joypad_init,
|
||||
dinput_joypad_query_pad,
|
||||
dinput_joypad_destroy,
|
||||
|
@ -642,7 +642,7 @@ static void gx_joypad_destroy(void)
|
||||
}
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t gx_joypad = {
|
||||
input_device_driver_t gx_joypad = {
|
||||
gx_joypad_init,
|
||||
gx_joypad_query_pad,
|
||||
gx_joypad_destroy,
|
||||
|
@ -80,7 +80,7 @@ static const char *hid_joypad_name(unsigned pad)
|
||||
return generic_hid->name(driver->hid_data, pad);
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t hid_joypad = {
|
||||
input_device_driver_t hid_joypad = {
|
||||
hid_joypad_init,
|
||||
hid_joypad_query_pad,
|
||||
hid_joypad_free,
|
||||
|
@ -358,7 +358,7 @@ static const char *linuxraw_joypad_name(unsigned pad)
|
||||
return *linuxraw_pads[pad].ident ? linuxraw_pads[pad].ident : NULL;
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t linuxraw_joypad = {
|
||||
input_device_driver_t linuxraw_joypad = {
|
||||
linuxraw_joypad_init,
|
||||
linuxraw_joypad_query_pad,
|
||||
linuxraw_joypad_destroy,
|
||||
|
@ -59,7 +59,7 @@ static void null_joypad_destroy(void)
|
||||
{
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t null_joypad = {
|
||||
input_device_driver_t null_joypad = {
|
||||
null_joypad_init,
|
||||
null_joypad_query_pad,
|
||||
null_joypad_destroy,
|
||||
|
@ -355,7 +355,7 @@ static const char *parport_joypad_name(unsigned pad)
|
||||
return *parport_pads[pad].ident ? parport_pads[pad].ident : NULL;
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t parport_joypad = {
|
||||
input_device_driver_t parport_joypad = {
|
||||
parport_joypad_init,
|
||||
parport_joypad_query_pad,
|
||||
parport_joypad_destroy,
|
||||
|
@ -280,7 +280,7 @@ static void ps3_joypad_destroy(void)
|
||||
}
|
||||
|
||||
|
||||
rarch_joypad_driver_t ps3_joypad = {
|
||||
inpout_device_driver_t ps3_joypad = {
|
||||
ps3_joypad_init,
|
||||
ps3_joypad_query_pad,
|
||||
ps3_joypad_destroy,
|
||||
|
@ -175,7 +175,7 @@ static void psp_joypad_destroy(void)
|
||||
{
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t psp_joypad = {
|
||||
input_device_driver_t psp_joypad = {
|
||||
psp_joypad_init,
|
||||
psp_joypad_query_pad,
|
||||
psp_joypad_destroy,
|
||||
|
@ -129,7 +129,7 @@ static void qnx_joypad_destroy(void)
|
||||
{
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t qnx_joypad = {
|
||||
input_device_driver_t qnx_joypad = {
|
||||
qnx_joypad_init,
|
||||
qnx_joypad_query_pad,
|
||||
qnx_joypad_destroy,
|
||||
|
@ -443,7 +443,7 @@ static const char *sdl_joypad_name(unsigned pad)
|
||||
return sdl_pad_name(pad);
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t sdl_joypad = {
|
||||
input_device_driver_t sdl_joypad = {
|
||||
sdl_joypad_init,
|
||||
sdl_joypad_query_pad,
|
||||
sdl_joypad_destroy,
|
||||
|
@ -652,7 +652,7 @@ static const char *udev_joypad_name(unsigned pad)
|
||||
return *udev_pads[pad].ident ? udev_pads[pad].ident : NULL;
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t udev_joypad = {
|
||||
input_device_driver_t udev_joypad = {
|
||||
udev_joypad_init,
|
||||
udev_joypad_query_pad,
|
||||
udev_joypad_destroy,
|
||||
|
@ -268,7 +268,7 @@ static void xdk_joypad_destroy(void)
|
||||
{
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t xdk_joypad = {
|
||||
input_device_driver_t xdk_joypad = {
|
||||
xdk_joypad_init,
|
||||
xdk_joypad_query_pad,
|
||||
xdk_joypad_destroy,
|
||||
|
@ -459,7 +459,7 @@ static bool xinput_joypad_rumble(unsigned pad,
|
||||
== ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
rarch_joypad_driver_t xinput_joypad = {
|
||||
input_device_driver_t xinput_joypad = {
|
||||
xinput_joypad_init,
|
||||
xinput_joypad_query_pad,
|
||||
xinput_joypad_destroy,
|
||||
|
@ -256,7 +256,7 @@ void input_driver_poll(void)
|
||||
}
|
||||
|
||||
|
||||
const rarch_joypad_driver_t * input_driver_get_joypad_driver(void)
|
||||
const input_device_driver_t *input_driver_get_joypad_driver(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
const input_driver_t *input = input_get_ptr(driver);
|
||||
|
@ -74,7 +74,7 @@ typedef struct input_driver
|
||||
void (*grab_mouse)(void *data, bool state);
|
||||
bool (*set_rumble)(void *data, unsigned port,
|
||||
enum retro_rumble_effect effect, uint16_t state);
|
||||
const rarch_joypad_driver_t *(*get_joypad_driver)(void *data);
|
||||
const input_device_driver_t *(*get_joypad_driver)(void *data);
|
||||
} input_driver_t;
|
||||
|
||||
extern input_driver_t input_android;
|
||||
@ -147,7 +147,7 @@ bool input_driver_key_pressed(int key);
|
||||
|
||||
uint64_t input_driver_get_capabilities(void);
|
||||
|
||||
const rarch_joypad_driver_t * input_driver_get_joypad_driver(void);
|
||||
const input_device_driver_t * input_driver_get_joypad_driver(void);
|
||||
|
||||
bool input_driver_grab_mouse(bool state);
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
* Returns: name of joystick #port.
|
||||
**/
|
||||
const char *input_joypad_name(const rarch_joypad_driver_t *drv,
|
||||
const char *input_joypad_name(const input_device_driver_t *drv,
|
||||
unsigned port)
|
||||
{
|
||||
if (!drv)
|
||||
@ -52,7 +52,7 @@ const char *input_joypad_name(const rarch_joypad_driver_t *drv,
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool input_joypad_set_rumble(const rarch_joypad_driver_t *drv,
|
||||
bool input_joypad_set_rumble(const input_device_driver_t *drv,
|
||||
unsigned port, enum retro_rumble_effect effect, uint16_t strength)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -81,7 +81,7 @@ bool input_joypad_set_rumble(const rarch_joypad_driver_t *drv,
|
||||
* false (0).
|
||||
**/
|
||||
bool input_joypad_pressed(
|
||||
const rarch_joypad_driver_t *drv,
|
||||
const input_device_driver_t *drv,
|
||||
unsigned port,
|
||||
const struct retro_keybind *binds,
|
||||
unsigned key)
|
||||
@ -137,7 +137,7 @@ bool input_joypad_pressed(
|
||||
*
|
||||
* Returns: analog value on success, otherwise 0.
|
||||
**/
|
||||
int16_t input_joypad_analog(const rarch_joypad_driver_t *drv,
|
||||
int16_t input_joypad_analog(const input_device_driver_t *drv,
|
||||
unsigned port, unsigned idx, unsigned ident,
|
||||
const struct retro_keybind *binds)
|
||||
{
|
||||
@ -208,7 +208,7 @@ int16_t input_joypad_analog(const rarch_joypad_driver_t *drv,
|
||||
* Returns: true (1) if axis was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
int16_t input_joypad_axis_raw(const rarch_joypad_driver_t *drv,
|
||||
int16_t input_joypad_axis_raw(const input_device_driver_t *drv,
|
||||
unsigned port, unsigned axis)
|
||||
{
|
||||
if (!drv)
|
||||
@ -229,7 +229,7 @@ int16_t input_joypad_axis_raw(const rarch_joypad_driver_t *drv,
|
||||
* Returns: true (1) if key was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
bool input_joypad_button_raw(const rarch_joypad_driver_t *drv,
|
||||
bool input_joypad_button_raw(const input_device_driver_t *drv,
|
||||
unsigned port, unsigned button)
|
||||
{
|
||||
if (!drv)
|
||||
@ -237,7 +237,7 @@ bool input_joypad_button_raw(const rarch_joypad_driver_t *drv,
|
||||
return drv->button(port, button);
|
||||
}
|
||||
|
||||
bool input_joypad_hat_raw(const rarch_joypad_driver_t *drv,
|
||||
bool input_joypad_hat_raw(const input_device_driver_t *drv,
|
||||
unsigned port, unsigned hat_dir, unsigned hat)
|
||||
{
|
||||
if (!drv)
|
||||
|
@ -81,7 +81,7 @@ static INLINE void input_conv_analog_id_to_bind_id(unsigned idx, unsigned ident,
|
||||
* Returns: true (1) if key was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
bool input_joypad_pressed(const rarch_joypad_driver_t *driver,
|
||||
bool input_joypad_pressed(const input_device_driver_t *driver,
|
||||
unsigned port, const struct retro_keybind *binds, unsigned key);
|
||||
|
||||
/**
|
||||
@ -103,7 +103,7 @@ bool input_joypad_pressed(const rarch_joypad_driver_t *driver,
|
||||
*
|
||||
* Returns: analog value on success, otherwise 0.
|
||||
**/
|
||||
int16_t input_joypad_analog(const rarch_joypad_driver_t *driver,
|
||||
int16_t input_joypad_analog(const input_device_driver_t *driver,
|
||||
unsigned port, unsigned idx, unsigned ident,
|
||||
const struct retro_keybind *binds);
|
||||
|
||||
@ -118,7 +118,7 @@ int16_t input_joypad_analog(const rarch_joypad_driver_t *driver,
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool input_joypad_set_rumble(const rarch_joypad_driver_t *driver,
|
||||
bool input_joypad_set_rumble(const input_device_driver_t *driver,
|
||||
unsigned port, enum retro_rumble_effect effect, uint16_t strength);
|
||||
|
||||
/**
|
||||
@ -133,7 +133,7 @@ bool input_joypad_set_rumble(const rarch_joypad_driver_t *driver,
|
||||
* Returns: true (1) if axis was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
int16_t input_joypad_axis_raw(const rarch_joypad_driver_t *driver,
|
||||
int16_t input_joypad_axis_raw(const input_device_driver_t *driver,
|
||||
unsigned port, unsigned axis);
|
||||
|
||||
/**
|
||||
@ -148,10 +148,10 @@ int16_t input_joypad_axis_raw(const rarch_joypad_driver_t *driver,
|
||||
* Returns: true (1) if key was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
bool input_joypad_button_raw(const rarch_joypad_driver_t *driver,
|
||||
bool input_joypad_button_raw(const input_device_driver_t *driver,
|
||||
unsigned port, unsigned button);
|
||||
|
||||
bool input_joypad_hat_raw(const rarch_joypad_driver_t *driver,
|
||||
bool input_joypad_hat_raw(const input_device_driver_t *driver,
|
||||
unsigned joypad, unsigned hat_dir, unsigned hat);
|
||||
|
||||
/**
|
||||
@ -163,7 +163,7 @@ bool input_joypad_hat_raw(const rarch_joypad_driver_t *driver,
|
||||
*
|
||||
* Returns: name of joystick #port.
|
||||
**/
|
||||
const char *input_joypad_name(const rarch_joypad_driver_t *driver,
|
||||
const char *input_joypad_name(const input_device_driver_t *driver,
|
||||
unsigned port);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <string/string_list.h>
|
||||
#include "../general.h"
|
||||
|
||||
static rarch_joypad_driver_t *joypad_drivers[] = {
|
||||
static input_device_driver_t *joypad_drivers[] = {
|
||||
#ifdef __CELLOS_LV2__
|
||||
&ps3_joypad,
|
||||
#endif
|
||||
@ -91,7 +91,7 @@ const void *joypad_driver_find_handle(int idx)
|
||||
**/
|
||||
const char *joypad_driver_find_ident(int idx)
|
||||
{
|
||||
const rarch_joypad_driver_t *drv = joypad_drivers[idx];
|
||||
const input_device_driver_t *drv = joypad_drivers[idx];
|
||||
if (!drv)
|
||||
return NULL;
|
||||
return drv->ident;
|
||||
@ -152,7 +152,7 @@ const char* config_get_joypad_driver_options(void)
|
||||
*
|
||||
* Returns: joypad driver if found, otherwise NULL.
|
||||
**/
|
||||
const rarch_joypad_driver_t *input_joypad_init_driver(const char *ident)
|
||||
const input_device_driver_t *input_joypad_init_driver(const char *ident)
|
||||
{
|
||||
unsigned i;
|
||||
if (!ident || !*ident)
|
||||
@ -179,7 +179,7 @@ const rarch_joypad_driver_t *input_joypad_init_driver(const char *ident)
|
||||
*
|
||||
* Returns: joypad driver if found, otherwise NULL.
|
||||
**/
|
||||
const rarch_joypad_driver_t *input_joypad_init_first(void)
|
||||
const input_device_driver_t *input_joypad_init_first(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
@ -25,7 +25,7 @@ extern "C" {
|
||||
#include <boolean.h>
|
||||
#include "../libretro.h"
|
||||
|
||||
typedef struct rarch_joypad_driver rarch_joypad_driver_t;
|
||||
typedef struct rarch_joypad_driver input_device_driver_t;
|
||||
|
||||
enum retro_rumble_effect;
|
||||
|
||||
@ -44,21 +44,21 @@ struct rarch_joypad_driver
|
||||
const char *ident;
|
||||
};
|
||||
|
||||
extern rarch_joypad_driver_t dinput_joypad;
|
||||
extern rarch_joypad_driver_t linuxraw_joypad;
|
||||
extern rarch_joypad_driver_t parport_joypad;
|
||||
extern rarch_joypad_driver_t udev_joypad;
|
||||
extern rarch_joypad_driver_t xinput_joypad;
|
||||
extern rarch_joypad_driver_t sdl_joypad;
|
||||
extern rarch_joypad_driver_t ps3_joypad;
|
||||
extern rarch_joypad_driver_t psp_joypad;
|
||||
extern rarch_joypad_driver_t ctr_joypad;
|
||||
extern rarch_joypad_driver_t xdk_joypad;
|
||||
extern rarch_joypad_driver_t gx_joypad;
|
||||
extern rarch_joypad_driver_t hid_joypad;
|
||||
extern rarch_joypad_driver_t android_joypad;
|
||||
extern rarch_joypad_driver_t qnx_joypad;
|
||||
extern rarch_joypad_driver_t null_joypad;
|
||||
extern input_device_driver_t dinput_joypad;
|
||||
extern input_device_driver_t linuxraw_joypad;
|
||||
extern input_device_driver_t parport_joypad;
|
||||
extern input_device_driver_t udev_joypad;
|
||||
extern input_device_driver_t xinput_joypad;
|
||||
extern input_device_driver_t sdl_joypad;
|
||||
extern input_device_driver_t ps3_joypad;
|
||||
extern input_device_driver_t psp_joypad;
|
||||
extern input_device_driver_t ctr_joypad;
|
||||
extern input_device_driver_t xdk_joypad;
|
||||
extern input_device_driver_t gx_joypad;
|
||||
extern input_device_driver_t hid_joypad;
|
||||
extern input_device_driver_t android_joypad;
|
||||
extern input_device_driver_t qnx_joypad;
|
||||
extern input_device_driver_t null_joypad;
|
||||
|
||||
/**
|
||||
* joypad_driver_find_handle:
|
||||
@ -98,7 +98,7 @@ const char* config_get_joypad_driver_options(void);
|
||||
*
|
||||
* Returns: joypad driver if found, otherwise NULL.
|
||||
**/
|
||||
const rarch_joypad_driver_t *input_joypad_init_driver(const char *ident);
|
||||
const input_device_driver_t *input_joypad_init_driver(const char *ident);
|
||||
|
||||
/**
|
||||
* input_joypad_init_first:
|
||||
@ -107,7 +107,7 @@ const rarch_joypad_driver_t *input_joypad_init_driver(const char *ident);
|
||||
*
|
||||
* Returns: joypad driver if found, otherwise NULL.
|
||||
**/
|
||||
const rarch_joypad_driver_t *input_joypad_init_first(void);
|
||||
const input_device_driver_t *input_joypad_init_first(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ void menu_input_key_event(bool down, unsigned keycode,
|
||||
static void menu_input_poll_bind_state(struct menu_bind_state *state)
|
||||
{
|
||||
unsigned i, b, a, h;
|
||||
const rarch_joypad_driver_t *joypad = input_driver_get_joypad_driver();
|
||||
const input_device_driver_t *joypad = input_driver_get_joypad_driver();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!state)
|
||||
@ -240,7 +240,7 @@ static void menu_input_poll_bind_state(struct menu_bind_state *state)
|
||||
static void menu_input_poll_bind_get_rested_axes(struct menu_bind_state *state)
|
||||
{
|
||||
unsigned i, a;
|
||||
const rarch_joypad_driver_t *joypad = input_driver_get_joypad_driver();
|
||||
const input_device_driver_t *joypad = input_driver_get_joypad_driver();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!state)
|
||||
|
@ -93,7 +93,7 @@ struct poll_data
|
||||
uint16_t hats[MAX_HATS];
|
||||
};
|
||||
|
||||
static void poll_joypad(const rarch_joypad_driver_t *driver,
|
||||
static void poll_joypad(const input_device_driver_t *driver,
|
||||
unsigned pad,
|
||||
struct poll_data *data)
|
||||
{
|
||||
@ -124,7 +124,7 @@ static void get_binds(config_file_t *conf, config_file_t *auto_conf,
|
||||
int player, int joypad)
|
||||
{
|
||||
int i, timeout_cnt;
|
||||
const rarch_joypad_driver_t *driver = input_joypad_init_driver(g_driver);
|
||||
const input_device_driver_t *driver = input_joypad_init_driver(g_driver);
|
||||
if (!driver)
|
||||
{
|
||||
fprintf(stderr, "Cannot find any valid input driver.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user