mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 02:08:16 +00:00
Optimize apple_input_is_pressed
This commit is contained in:
parent
647ffca76c
commit
57457c2d70
@ -316,7 +316,7 @@ static bool cocoa_input_key_pressed(void *data, int key)
|
||||
settings_t *settings = config_get_ptr();
|
||||
int port = 0;
|
||||
|
||||
if (apple_input_is_pressed(0, settings->input.binds[0], key))
|
||||
if (settings->input.binds[0][key].valid && apple_input_is_pressed(0, settings->input.binds[0], key))
|
||||
return true;
|
||||
|
||||
if (settings->input.all_users_control_menu)
|
||||
|
@ -313,7 +313,7 @@ int16_t apple_input_is_pressed(unsigned port_num,
|
||||
{
|
||||
const struct retro_keybind *bind = &binds[id];
|
||||
unsigned bit = input_keymaps_translate_rk_to_keysym(bind->key);
|
||||
return bind->valid && apple_key_state[bit];
|
||||
return apple_key_state[bit];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user