mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 18:00:57 +00:00
Optimize android_keyboard_port_input_pressed
This commit is contained in:
parent
57457c2d70
commit
b0ed69f05c
@ -1162,7 +1162,7 @@ static bool android_input_key_pressed(void *data, int key)
|
||||
settings_t *settings = config_get_ptr();
|
||||
int port = 0;
|
||||
|
||||
if(android_keyboard_port_input_pressed(settings->input.binds[0],key))
|
||||
if(settings->input.binds[0][key].valid && android_keyboard_port_input_pressed(settings->input.binds[0],key))
|
||||
return true;
|
||||
|
||||
if (settings->input.all_users_control_menu)
|
||||
|
@ -32,7 +32,7 @@ bool android_keyboard_port_input_pressed(const struct retro_keybind *binds, unsi
|
||||
{
|
||||
const struct retro_keybind *bind = &binds[id];
|
||||
unsigned bit = input_keymaps_translate_rk_to_keysym(binds[id].key);
|
||||
return bind->valid && BIT_GET(android_key_state[ANDROID_KEYBOARD_PORT], bit);
|
||||
return BIT_GET(android_key_state[ANDROID_KEYBOARD_PORT], bit);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user