mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Expand input_keys_pressed
This commit is contained in:
parent
be81a73666
commit
be617c530b
@ -667,7 +667,8 @@ uint64_t input_menu_keys_pressed(
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
bool runloop_paused)
|
||||
bool runloop_paused,
|
||||
bool *nonblock_state)
|
||||
{
|
||||
uint64_t ret = 0;
|
||||
|
||||
@ -683,7 +684,7 @@ uint64_t input_menu_keys_pressed(
|
||||
|
||||
if (settings->menu.unified_controls && !menu_input_dialog_get_display_kb())
|
||||
return input_keys_pressed(old_input, last_input,
|
||||
trigger_input, runloop_paused);
|
||||
trigger_input, runloop_paused, nonblock_state);
|
||||
|
||||
for (i = 0; i < max_users; i++)
|
||||
{
|
||||
@ -810,6 +811,8 @@ uint64_t input_menu_keys_pressed(
|
||||
if (menu_driver_is_binding_state())
|
||||
*trigger_input = 0;
|
||||
|
||||
*nonblock_state = input_driver_nonblock_state;
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@ -885,7 +888,8 @@ uint64_t input_keys_pressed(
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
bool runloop_paused)
|
||||
bool runloop_paused,
|
||||
bool *nonblock_state)
|
||||
{
|
||||
unsigned i;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
@ -964,6 +968,8 @@ uint64_t input_keys_pressed(
|
||||
}
|
||||
}
|
||||
|
||||
*nonblock_state = input_driver_nonblock_state;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -237,14 +237,16 @@ uint64_t input_keys_pressed(
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
bool runloop_paused);
|
||||
bool runloop_paused,
|
||||
bool *nonblock_state);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
uint64_t input_menu_keys_pressed(
|
||||
uint64_t old_input,
|
||||
uint64_t *last_input,
|
||||
uint64_t *trigger_input,
|
||||
bool runloop_paused);
|
||||
bool runloop_paused,
|
||||
bool *nonblock_state);
|
||||
#endif
|
||||
|
||||
void *input_driver_get_data(void);
|
||||
|
@ -1047,6 +1047,7 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
retro_time_t current, target, to_sleep_ms;
|
||||
uint64_t trigger_input = 0;
|
||||
static uint64_t last_input = 0;
|
||||
bool input_driver_is_nonblock = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
uint64_t old_input = last_input;
|
||||
#ifdef HAVE_MENU
|
||||
@ -1054,16 +1055,17 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
#else
|
||||
bool menu_is_alive = false;
|
||||
#endif
|
||||
bool input_driver_is_nonblock = input_driver_is_nonblock_state();
|
||||
uint64_t current_input =
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_is_alive ?
|
||||
input_menu_keys_pressed(old_input,
|
||||
&last_input, &trigger_input, runloop_paused) :
|
||||
&last_input, &trigger_input, runloop_paused,
|
||||
&input_driver_is_nonblock) :
|
||||
#endif
|
||||
input_keys_pressed(old_input, &last_input,
|
||||
&trigger_input, runloop_paused);
|
||||
&trigger_input, runloop_paused,
|
||||
&input_driver_is_nonblock);
|
||||
|
||||
if (runloop_frame_time.callback)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user