mirror of
https://github.com/libretro/RetroArch
synced 2025-03-18 04:21:19 +00:00
Cleanups
This commit is contained in:
parent
4bc39ee1cf
commit
8eb70071f4
35
retroarch.c
35
retroarch.c
@ -36110,32 +36110,38 @@ static enum runloop_state runloop_check_state(
|
|||||||
|
|
||||||
{
|
{
|
||||||
rarch_joypad_info_t joypad_info;
|
rarch_joypad_info_t joypad_info;
|
||||||
#ifdef HAVE_MENU
|
|
||||||
bool menu_input_active = false;
|
|
||||||
#endif
|
|
||||||
unsigned port = 0;
|
unsigned port = 0;
|
||||||
int input_hotkey_block_delay = settings->uints.input_hotkey_block_delay;
|
int input_hotkey_block_delay = settings->uints.input_hotkey_block_delay;
|
||||||
const struct retro_keybind *binds_norm = &input_config_binds[port][RARCH_ENABLE_HOTKEY];
|
const struct retro_keybind *binds_norm = &input_config_binds[port][RARCH_ENABLE_HOTKEY];
|
||||||
const struct retro_keybind *binds_auto = &input_autoconf_binds[port][RARCH_ENABLE_HOTKEY];
|
const struct retro_keybind *binds_auto = &input_autoconf_binds[port][RARCH_ENABLE_HOTKEY];
|
||||||
const struct retro_keybind *binds = input_config_binds[port];
|
const struct retro_keybind *binds = input_config_binds[port];
|
||||||
|
struct retro_keybind *auto_binds = input_autoconf_binds[port];
|
||||||
|
struct retro_keybind *general_binds = input_config_binds[port];
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
bool menu_input_active = menu_is_alive && !(settings->bools.menu_unified_controls && !display_kb);
|
||||||
|
#else
|
||||||
|
bool menu_input_active = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
joypad_info.joy_idx = settings->uints.input_joypad_map[port];
|
joypad_info.joy_idx = settings->uints.input_joypad_map[port];
|
||||||
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
||||||
joypad_info.axis_threshold = p_rarch->input_driver_axis_threshold;
|
joypad_info.axis_threshold = p_rarch->input_driver_axis_threshold;
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_input_active = menu_is_alive && !(settings->bools.menu_unified_controls && !display_kb);
|
|
||||||
if (menu_input_active)
|
if (menu_input_active)
|
||||||
{
|
{
|
||||||
struct retro_keybind *auto_binds = input_autoconf_binds[port];
|
|
||||||
struct retro_keybind *general_binds = input_config_binds[port];
|
|
||||||
|
|
||||||
INPUT_PUSH_ANALOG_DPAD(auto_binds, ANALOG_DPAD_LSTICK);
|
INPUT_PUSH_ANALOG_DPAD(auto_binds, ANALOG_DPAD_LSTICK);
|
||||||
INPUT_PUSH_ANALOG_DPAD(general_binds, ANALOG_DPAD_LSTICK);
|
INPUT_PUSH_ANALOG_DPAD(general_binds, ANALOG_DPAD_LSTICK);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
input_keys_pressed(port, true, input_hotkey_block_delay, p_rarch,
|
input_keys_pressed(port, menu_input_active, input_hotkey_block_delay, p_rarch,
|
||||||
¤t_bits, &binds, binds_norm, binds_auto,
|
¤t_bits, &binds, binds_norm, binds_auto,
|
||||||
&joypad_info);
|
&joypad_info);
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
if (menu_input_active)
|
||||||
|
{
|
||||||
INPUT_POP_ANALOG_DPAD(auto_binds);
|
INPUT_POP_ANALOG_DPAD(auto_binds);
|
||||||
INPUT_POP_ANALOG_DPAD(general_binds);
|
INPUT_POP_ANALOG_DPAD(general_binds);
|
||||||
|
|
||||||
@ -36190,15 +36196,6 @@ static enum runloop_state runloop_check_state(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
{
|
|
||||||
input_keys_pressed(port, false, input_hotkey_block_delay, p_rarch,
|
|
||||||
¤t_bits, &binds, binds_norm, binds_auto,
|
|
||||||
&joypad_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
|
||||||
if (!menu_input_active)
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ACCESSIBILITY
|
#ifdef HAVE_ACCESSIBILITY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user