mirror of
https://github.com/libretro/RetroArch
synced 2025-02-22 12:40:09 +00:00
(Android) Last input tweak for today
This commit is contained in:
parent
6d23abef55
commit
0210f8f72f
@ -350,21 +350,13 @@ static void android_input_poll(void *data)
|
|||||||
|
|
||||||
static int16_t android_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)
|
static int16_t android_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned index, unsigned id)
|
||||||
{
|
{
|
||||||
unsigned player = port;
|
|
||||||
uint64_t button = binds[player][id].joykey;
|
|
||||||
int16_t retval = 0;
|
|
||||||
|
|
||||||
if((player < pads_connected))
|
|
||||||
{
|
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
case RETRO_DEVICE_JOYPAD:
|
case RETRO_DEVICE_JOYPAD:
|
||||||
retval = (state[player] & button) ? 1 : 0;
|
return ((state[port] & binds[port][id].joykey) && (port < pads_connected));
|
||||||
break;
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool android_input_key_pressed(void *data, int key)
|
static bool android_input_key_pressed(void *data, int key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user