(Android) Last input tweak for today

This commit is contained in:
twinaphex 2012-12-17 20:53:36 +01:00
parent 6d23abef55
commit 0210f8f72f

View File

@ -349,24 +349,16 @@ 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)
{ {
(void)data; (void)data;