mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 10:13:39 +00:00
Cleanups
This commit is contained in:
parent
b2e57db8c2
commit
f117b22a46
30
retroarch.c
30
retroarch.c
@ -12324,16 +12324,6 @@ static void input_menu_keys_pressed(input_bits_t *p_new_state)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define INPUT_KEYS_CHECK(cond1, cond2, cond3) \
|
||||
for (i = cond1; i < cond2; i++) \
|
||||
{ \
|
||||
bool bit_pressed = !cond3 && binds[i].valid && current_input->input_state(current_input_data, joypad_info, &binds, 0, RETRO_DEVICE_JOYPAD, 0, i); \
|
||||
if (bit_pressed || ((i >= RARCH_FIRST_META_KEY) && BIT64_GET(lifecycle_state, i)) || input_keys_pressed_other_sources(i, p_new_state)) \
|
||||
{ \
|
||||
BIT256_SET_PTR(p_new_state, i); \
|
||||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
* input_keys_pressed:
|
||||
*
|
||||
@ -12387,12 +12377,24 @@ static void input_keys_pressed(input_bits_t *p_new_state)
|
||||
}
|
||||
|
||||
/* Check the libretro input first */
|
||||
INPUT_KEYS_CHECK(0, RARCH_FIRST_META_KEY,
|
||||
input_driver_block_libretro_input);
|
||||
for (i = 0; i < RARCH_FIRST_META_KEY; i++)
|
||||
{
|
||||
bool bit_pressed = !input_driver_block_libretro_input && binds[i].valid && current_input->input_state(current_input_data, joypad_info, &binds, 0, RETRO_DEVICE_JOYPAD, 0, i);
|
||||
if (bit_pressed || input_keys_pressed_other_sources(i, p_new_state))
|
||||
{
|
||||
BIT256_SET_PTR(p_new_state, i);
|
||||
}
|
||||
}
|
||||
|
||||
/* Check the hotkeys */
|
||||
INPUT_KEYS_CHECK(RARCH_FIRST_META_KEY, RARCH_BIND_LIST_END,
|
||||
input_driver_block_hotkey);
|
||||
for (i = RARCH_FIRST_META_KEY; i < RARCH_BIND_LIST_END; i++)
|
||||
{
|
||||
bool bit_pressed = !input_driver_block_hotkey && binds[i].valid && current_input->input_state(current_input_data, joypad_info, &binds, 0, RETRO_DEVICE_JOYPAD, 0, i);
|
||||
if (bit_pressed || BIT64_GET(lifecycle_state, i) || input_keys_pressed_other_sources(i, p_new_state))
|
||||
{
|
||||
BIT256_SET_PTR(p_new_state, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int16_t input_driver_input_state(
|
||||
|
Loading…
x
Reference in New Issue
Block a user