Move clear operation outside of keys_pressed functions

This commit is contained in:
twinaphex 2018-04-09 00:30:45 +02:00
parent 47a528801d
commit 7b5a0bf706
2 changed files with 4 additions and 4 deletions

View File

@ -866,8 +866,6 @@ void input_menu_keys_pressed(void *data, input_bits_t *p_new_state)
joypad_info.joy_idx = 0;
joypad_info.auto_binds = NULL;
BIT256_CLEAR_ALL_PTR(p_new_state);
input_driver_block_libretro_input = false;
input_driver_block_hotkey = false;
@ -1072,8 +1070,6 @@ void input_keys_pressed(void *data, input_bits_t *p_new_state)
const struct retro_keybind *enable_hotkey = &input_config_binds[0][RARCH_ENABLE_HOTKEY];
bool game_focus_toggle_valid = false;
BIT256_CLEAR_ALL_PTR(p_new_state);
joypad_info.joy_idx = settings->uints.input_joypad_map[0];
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
joypad_info.axis_threshold = input_driver_axis_threshold;

View File

@ -2446,7 +2446,11 @@ static enum runloop_state runloop_check_state(
#ifdef HAVE_MENU
bool menu_driver_binding_state = menu_driver_is_binding_state();
bool menu_is_alive = menu_driver_is_alive();
#endif
BIT256_CLEAR_ALL_PTR(&current_input);
#ifdef HAVE_MENU
if (menu_is_alive && !(settings->bools.menu_unified_controls && !menu_input_dialog_get_display_kb()))
input_menu_keys_pressed(settings, &current_input);
else