From 00df0295576ee07530ed07e220d59c574fe3f489 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 12 Jun 2020 18:45:35 +0200 Subject: [PATCH] Get rid of some extraneous 'valid' checks in in input_keys_pressed --- retroarch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/retroarch.c b/retroarch.c index 9dcebeb0c8..f62dbfc890 100644 --- a/retroarch.c +++ b/retroarch.c @@ -24130,8 +24130,7 @@ static void input_keys_pressed( const struct retro_keybind *hotkey = &input_config_binds[port][RARCH_ENABLE_HOTKEY]; - if ( hotkey->valid - && p_rarch->current_input->input_state( + if ( p_rarch->current_input->input_state( p_rarch->current_input_data, joypad_info, &binds[port], port, RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY)) @@ -24191,8 +24190,9 @@ static void input_keys_pressed( for (i = 0; i < RARCH_FIRST_META_KEY; i++) { - bool bit_pressed = binds[port][i].valid && (ret & (UINT64_C(1) << i)); - if (bit_pressed || input_keys_pressed_other_sources(p_rarch, + if ( + (ret & (UINT64_C(1) << i)) || + input_keys_pressed_other_sources(p_rarch, i, p_new_state)) { BIT256_SET_PTR(p_new_state, i);