Optimize apple_input_is_pressed

This commit is contained in:
twinaphex 2016-10-23 20:42:09 +02:00
parent 647ffca76c
commit 57457c2d70
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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;
}