mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 19:21:09 +00:00
(input drivers) Cleanups
This commit is contained in:
parent
826fbf6bdf
commit
a72759aba0
@ -32,7 +32,7 @@
|
||||
|
||||
typedef struct ctr_input
|
||||
{
|
||||
const input_device_driver_t *joypad;
|
||||
void *empty;
|
||||
} ctr_input_t;
|
||||
|
||||
static int16_t ctr_input_state(
|
||||
@ -47,8 +47,6 @@ static int16_t ctr_input_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
ctr_input_t *ctr = (ctr_input_t*)data;
|
||||
|
||||
if (port >= MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS)
|
||||
return 0;
|
||||
|
||||
|
@ -66,8 +66,6 @@ static int16_t dos_input_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
dos_input_t *dos = (dos_input_t*)data;
|
||||
|
||||
if (port > 0)
|
||||
return 0;
|
||||
|
||||
|
@ -43,8 +43,6 @@ static int16_t ps2_input_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
ps2_input_t *ps2 = (ps2_input_t*)data;
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
@ -66,8 +64,6 @@ static int16_t ps2_input_state(
|
||||
|
||||
static void ps2_input_free_input(void *data)
|
||||
{
|
||||
ps2_input_t *ps2 = (ps2_input_t*)data;
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
|
@ -49,8 +49,6 @@ static int16_t ps4_input_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
ps4_input_t *ps4 = (ps4_input_t*)data;
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
|
@ -80,8 +80,6 @@ static int16_t uwp_input_state(
|
||||
unsigned index,
|
||||
unsigned id)
|
||||
{
|
||||
uwp_input_t *uwp = (uwp_input_t*)data;
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
|
@ -102,9 +102,7 @@ static int16_t wiiu_input_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
wiiu_input_t *wiiu = (wiiu_input_t*)data;
|
||||
|
||||
if (!wiiu || !(port < DEFAULT_MAX_PADS) || !binds || !binds[port])
|
||||
if (!(port < DEFAULT_MAX_PADS) || !binds || !binds[port])
|
||||
return 0;
|
||||
|
||||
switch (device)
|
||||
@ -151,8 +149,6 @@ static int16_t wiiu_input_state(
|
||||
|
||||
static void wiiu_input_free_input(void *data)
|
||||
{
|
||||
wiiu_input_t *wiiu = (wiiu_input_t*)data;
|
||||
|
||||
KBDTeardown();
|
||||
|
||||
free(data);
|
||||
|
@ -52,8 +52,6 @@ static int16_t xdk_input_state(
|
||||
unsigned index,
|
||||
unsigned id)
|
||||
{
|
||||
xdk_input_t *xdk = (xdk_input_t*)data;
|
||||
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
||||
|
@ -74,8 +74,6 @@ static int16_t xenon360_input_state(
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
uint64_t button = binds[port][id].joykey;
|
||||
|
||||
if (port >= DEFAULT_MAX_PADS)
|
||||
return 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user