(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"
|
#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)
|
static void ctr_input_free_input(void *data)
|
||||||
{
|
{
|
||||||
free(data);
|
free(data);
|
||||||
|
@ -42,11 +34,7 @@ static void ctr_input_free_input(void *data)
|
||||||
|
|
||||||
static void* ctr_input_init(const char *joypad_driver)
|
static void* ctr_input_init(const char *joypad_driver)
|
||||||
{
|
{
|
||||||
ctr_input_t *ctr = (ctr_input_t*)calloc(1, sizeof(*ctr));
|
return (void*)-1;
|
||||||
if (!ctr)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return ctr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t ctr_input_get_capabilities(void *data)
|
static uint64_t ctr_input_get_capabilities(void *data)
|
||||||
|
|
|
@ -26,24 +26,12 @@
|
||||||
|
|
||||||
#include "../input_driver.h"
|
#include "../input_driver.h"
|
||||||
|
|
||||||
typedef struct ps2_input
|
|
||||||
{
|
|
||||||
void *empty;
|
|
||||||
} ps2_input_t;
|
|
||||||
|
|
||||||
static void ps2_input_free_input(void *data)
|
static void ps2_input_free_input(void *data)
|
||||||
{
|
{
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* ps2_input_initialize(const char *joypad_driver)
|
static void* ps2_input_initialize(const char *a) { return (void*)-1; }
|
||||||
{
|
|
||||||
ps2_input_t *ps2 = (ps2_input_t*)calloc(1, sizeof(*ps2));
|
|
||||||
if (!ps2)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return ps2;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint64_t ps2_input_get_capabilities(void *data)
|
static uint64_t ps2_input_get_capabilities(void *data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,27 +29,12 @@
|
||||||
|
|
||||||
#include "../input_driver.h"
|
#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)
|
static void ps4_input_free_input(void *data)
|
||||||
{
|
{
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* ps4_input_initialize(const char *joypad_driver)
|
static void* ps4_input_initialize(const char *a) { return (void*)-1; }
|
||||||
{
|
|
||||||
ps4_input_t *ps4 = (ps4_input_t*)calloc(1, sizeof(*ps4));
|
|
||||||
if (!ps4)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return ps4;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint64_t ps4_input_get_capabilities(void *data)
|
static uint64_t ps4_input_get_capabilities(void *data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,12 +27,7 @@
|
||||||
|
|
||||||
#include "../input_driver.h"
|
#include "../input_driver.h"
|
||||||
|
|
||||||
// TODO: Add support for multiple mice and multiple touch
|
/* TODO: Add support for multiple mice and multiple touch */
|
||||||
|
|
||||||
typedef struct uwp_input
|
|
||||||
{
|
|
||||||
void *empty;
|
|
||||||
} uwp_input_t;
|
|
||||||
|
|
||||||
static void uwp_input_free_input(void *data)
|
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)
|
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);
|
input_keymaps_init_keyboard_lut(rarch_key_map_uwp);
|
||||||
|
|
||||||
return uwp;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t uwp_input_get_capabilities(void *data)
|
static uint64_t uwp_input_get_capabilities(void *data)
|
||||||
|
|
|
@ -32,27 +32,8 @@
|
||||||
|
|
||||||
#include "../input_driver.h"
|
#include "../input_driver.h"
|
||||||
|
|
||||||
/* TODO/FIXME -
|
static void xdk_input_free_input(void *data) { free(data); }
|
||||||
* fix game focus toggle */
|
static void *xdk_input_init(const char *a) { return (void*)-1; }
|
||||||
|
|
||||||
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 uint64_t xdk_input_get_capabilities(void *data)
|
static uint64_t xdk_input_get_capabilities(void *data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
|
|
||||||
/* TODO/FIXME - add joypad driver */
|
/* TODO/FIXME - add joypad driver */
|
||||||
|
|
||||||
/* TODO/FIXME -
|
|
||||||
* fix game focus toggle */
|
|
||||||
|
|
||||||
/* TODO/FIXME - static global variable */
|
/* TODO/FIXME - static global variable */
|
||||||
static uint64_t state[DEFAULT_MAX_PADS];
|
static uint64_t state[DEFAULT_MAX_PADS];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue