mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-11 13:26:34 +00:00
More small cleanups
This commit is contained in:
parent
e6eeb8e559
commit
5337e494c6
@ -561,7 +561,7 @@ static bool check_input_driver_block_hotkey(bool enable_hotkey)
|
||||
|
||||
/* If we hold ENABLE_HOTKEY button, block all libretro input to allow
|
||||
* hotkeys to be bound to same keys as RetroPad. */
|
||||
return (use_hotkey_enable && enable_hotkey);
|
||||
return use_hotkey_enable;
|
||||
}
|
||||
|
||||
static const unsigned buttons[] = {
|
||||
@ -678,14 +678,13 @@ static INLINE bool input_keys_pressed_internal(unsigned i,
|
||||
uint64_t input_keys_pressed(void)
|
||||
{
|
||||
unsigned i;
|
||||
uint64_t ret = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
uint64_t ret = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const struct retro_keybind *binds = settings->input.binds[0];
|
||||
bool enable_hotkey = current_input->input_state(current_input_data, &binds, 0,
|
||||
RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY);
|
||||
|
||||
if (
|
||||
check_input_driver_block_hotkey(
|
||||
current_input->input_state(current_input_data, &binds, 0,
|
||||
RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY)))
|
||||
if (check_input_driver_block_hotkey(enable_hotkey) && enable_hotkey)
|
||||
input_driver_block_libretro_input = true;
|
||||
else
|
||||
input_driver_block_libretro_input = false;
|
||||
@ -785,6 +784,7 @@ uint64_t input_menu_keys_pressed(void)
|
||||
{
|
||||
unsigned i;
|
||||
uint64_t ret = 0;
|
||||
bool enable_hotkey = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||
|
||||
@ -795,10 +795,10 @@ uint64_t input_menu_keys_pressed(void)
|
||||
input_push_analog_dpad(settings->input.autoconf_binds[i],
|
||||
ANALOG_DPAD_LSTICK);
|
||||
|
||||
if (
|
||||
check_input_driver_block_hotkey(
|
||||
current_input->input_state(current_input_data, &binds[0], 0,
|
||||
RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY)))
|
||||
enable_hotkey = current_input->input_state(current_input_data, &binds[0], 0,
|
||||
RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY);
|
||||
|
||||
if (check_input_driver_block_hotkey(enable_hotkey) && enable_hotkey)
|
||||
input_driver_block_libretro_input = true;
|
||||
else
|
||||
input_driver_block_libretro_input = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user