mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-29 14:13:19 +00:00
Slightly rewrite input_state for android input driver
This commit is contained in:
parent
34be5566dd
commit
9b13894438
@ -1341,14 +1341,17 @@ static int16_t android_input_state(void *data,
|
||||
const struct retro_keybind **binds, unsigned port, unsigned device,
|
||||
unsigned idx, unsigned id)
|
||||
{
|
||||
int16_t ret = 0;
|
||||
android_input_t *android = (android_input_t*)data;
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
return input_joypad_pressed(android->joypad, joypad_info,
|
||||
port, binds[port], id) ||
|
||||
android_keyboard_port_input_pressed(binds[port],id);
|
||||
ret = input_joypad_pressed(android->joypad, joypad_info,
|
||||
port, binds[port], id);
|
||||
if (!ret)
|
||||
ret = android_keyboard_port_input_pressed(binds[port],id);
|
||||
return ret;
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
if (binds[port])
|
||||
return input_joypad_analog(android->joypad, joypad_info,
|
||||
|
Loading…
Reference in New Issue
Block a user