mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 02:08:16 +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();
|
settings_t *settings = config_get_ptr();
|
||||||
int port = 0;
|
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;
|
return true;
|
||||||
|
|
||||||
if (settings->input.all_users_control_menu)
|
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];
|
const struct retro_keybind *bind = &binds[id];
|
||||||
unsigned bit = input_keymaps_translate_rk_to_keysym(binds[id].key);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user