mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-28 21:55:27 +00:00
Fix crash when defining gamepad keys
This commit is contained in:
parent
bdb9471d13
commit
84b6b505ad
@ -976,8 +976,11 @@ static void android_input_poll_input(void *data)
|
||||
|
||||
if (is_keyboard_id(id))
|
||||
{
|
||||
if (!predispatched) android_input_poll_event_type_keyboard(event, keycode, &handled);
|
||||
android_input_poll_event_type_key(android_app, event, ANDROID_KEYBOARD_PORT, keycode, source, type_event, &handled);
|
||||
if (!predispatched)
|
||||
{
|
||||
android_input_poll_event_type_keyboard(event, keycode, &handled);
|
||||
android_input_poll_event_type_key(android_app, event, ANDROID_KEYBOARD_PORT, keycode, source, type_event, &handled);
|
||||
}
|
||||
}
|
||||
else
|
||||
android_input_poll_event_type_key(android_app,
|
||||
@ -1113,8 +1116,6 @@ static int16_t android_input_state(void *data,
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
return input_joypad_pressed(android->joypad, port, binds[port], id) ||
|
||||
android_keyboard_port_input_pressed(binds[port],id);
|
||||
case RETRO_DEVICE_KEYBOARD:
|
||||
android_keyboard_port_input_pressed(binds[0],id);
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
return input_joypad_analog(android->joypad, port, idx, id,
|
||||
binds[port]);
|
||||
@ -1205,7 +1206,6 @@ static uint64_t android_input_get_capabilities(void *data)
|
||||
|
||||
return
|
||||
(1 << RETRO_DEVICE_JOYPAD) |
|
||||
(1 << RETRO_DEVICE_KEYBOARD) |
|
||||
(1 << RETRO_DEVICE_POINTER) |
|
||||
(1 << RETRO_DEVICE_ANALOG);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user