mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 01:13:30 +00:00
(Input drivers) Cleanups - if we don't need userdata and it's just
empty then just pass (void*)-1 to init function
This commit is contained in:
parent
3d09bacb93
commit
2c97878851
@ -27,14 +27,6 @@
|
||||
|
||||
#include "../input_driver.h"
|
||||
|
||||
/* TODO/FIXME -
|
||||
* fix game focus toggle */
|
||||
|
||||
typedef struct ctr_input
|
||||
{
|
||||
void *empty;
|
||||
} ctr_input_t;
|
||||
|
||||
static void ctr_input_free_input(void *data)
|
||||
{
|
||||
free(data);
|
||||
@ -42,11 +34,7 @@ static void ctr_input_free_input(void *data)
|
||||
|
||||
static void* ctr_input_init(const char *joypad_driver)
|
||||
{
|
||||
ctr_input_t *ctr = (ctr_input_t*)calloc(1, sizeof(*ctr));
|
||||
if (!ctr)
|
||||
return NULL;
|
||||
|
||||
return ctr;
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static uint64_t ctr_input_get_capabilities(void *data)
|
||||
|
@ -26,24 +26,12 @@
|
||||
|
||||
#include "../input_driver.h"
|
||||
|
||||
typedef struct ps2_input
|
||||
{
|
||||
void *empty;
|
||||
} ps2_input_t;
|
||||
|
||||
static void ps2_input_free_input(void *data)
|
||||
{
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void* ps2_input_initialize(const char *joypad_driver)
|
||||
{
|
||||
ps2_input_t *ps2 = (ps2_input_t*)calloc(1, sizeof(*ps2));
|
||||
if (!ps2)
|
||||
return NULL;
|
||||
|
||||
return ps2;
|
||||
}
|
||||
static void* ps2_input_initialize(const char *a) { return (void*)-1; }
|
||||
|
||||
static uint64_t ps2_input_get_capabilities(void *data)
|
||||
{
|
||||
|
@ -29,27 +29,12 @@
|
||||
|
||||
#include "../input_driver.h"
|
||||
|
||||
/* TODO/FIXME -
|
||||
* fix game focus toggle */
|
||||
|
||||
typedef struct ps4_input
|
||||
{
|
||||
void *empty;
|
||||
} ps4_input_t;
|
||||
|
||||
static void ps4_input_free_input(void *data)
|
||||
{
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void* ps4_input_initialize(const char *joypad_driver)
|
||||
{
|
||||
ps4_input_t *ps4 = (ps4_input_t*)calloc(1, sizeof(*ps4));
|
||||
if (!ps4)
|
||||
return NULL;
|
||||
|
||||
return ps4;
|
||||
}
|
||||
static void* ps4_input_initialize(const char *a) { return (void*)-1; }
|
||||
|
||||
static uint64_t ps4_input_get_capabilities(void *data)
|
||||
{
|
||||
|
@ -27,12 +27,7 @@
|
||||
|
||||
#include "../input_driver.h"
|
||||
|
||||
// TODO: Add support for multiple mice and multiple touch
|
||||
|
||||
typedef struct uwp_input
|
||||
{
|
||||
void *empty;
|
||||
} uwp_input_t;
|
||||
/* TODO: Add support for multiple mice and multiple touch */
|
||||
|
||||
static void uwp_input_free_input(void *data)
|
||||
{
|
||||
@ -41,13 +36,9 @@ static void uwp_input_free_input(void *data)
|
||||
|
||||
static void *uwp_input_init(const char *joypad_driver)
|
||||
{
|
||||
uwp_input_t *uwp = (uwp_input_t*)calloc(1, sizeof(*uwp));
|
||||
if (!uwp)
|
||||
return NULL;
|
||||
|
||||
input_keymaps_init_keyboard_lut(rarch_key_map_uwp);
|
||||
|
||||
return uwp;
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static uint64_t uwp_input_get_capabilities(void *data)
|
||||
|
@ -32,27 +32,8 @@
|
||||
|
||||
#include "../input_driver.h"
|
||||
|
||||
/* TODO/FIXME -
|
||||
* fix game focus toggle */
|
||||
|
||||
typedef struct xdk_input
|
||||
{
|
||||
void *empty;
|
||||
} xdk_input_t;
|
||||
|
||||
static void xdk_input_free_input(void *data)
|
||||
{
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void *xdk_input_init(const char *joypad_driver)
|
||||
{
|
||||
xdk_input_t *xdk = (xdk_input_t*)calloc(1, sizeof(*xdk));
|
||||
if (!xdk)
|
||||
return NULL;
|
||||
|
||||
return xdk;
|
||||
}
|
||||
static void xdk_input_free_input(void *data) { free(data); }
|
||||
static void *xdk_input_init(const char *a) { return (void*)-1; }
|
||||
|
||||
static uint64_t xdk_input_get_capabilities(void *data)
|
||||
{
|
||||
|
@ -29,9 +29,6 @@
|
||||
|
||||
/* TODO/FIXME - add joypad driver */
|
||||
|
||||
/* TODO/FIXME -
|
||||
* fix game focus toggle */
|
||||
|
||||
/* TODO/FIXME - static global variable */
|
||||
static uint64_t state[DEFAULT_MAX_PADS];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user