mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Move this code to retroarch.c
This commit is contained in:
parent
f8f25602e8
commit
8bf552dacd
@ -124,7 +124,7 @@ void *current_input_data = NULL;
|
||||
static bool input_driver_block_hotkey = false;
|
||||
static bool input_driver_block_libretro_input = false;
|
||||
static bool input_driver_nonblock_state = false;
|
||||
static bool input_driver_flushing_input = false;
|
||||
bool input_driver_flushing_input = false;
|
||||
static bool input_driver_data_own = false;
|
||||
static float input_driver_axis_threshold = 0.0f;
|
||||
static unsigned input_driver_max_users = 0;
|
||||
@ -807,19 +807,6 @@ uint64_t input_menu_keys_pressed(
|
||||
}
|
||||
|
||||
*last_input = ret;
|
||||
|
||||
if (input_driver_flushing_input)
|
||||
{
|
||||
input_driver_flushing_input = false;
|
||||
if (ret)
|
||||
{
|
||||
ret = 0;
|
||||
if (runloop_paused)
|
||||
BIT64_SET(ret, RARCH_PAUSE_TOGGLE);
|
||||
input_driver_flushing_input = true;
|
||||
}
|
||||
}
|
||||
|
||||
*nonblock_state = input_driver_nonblock_state;
|
||||
|
||||
return ret;
|
||||
@ -968,19 +955,6 @@ uint64_t input_keys_pressed(
|
||||
}
|
||||
|
||||
*last_input = ret;
|
||||
|
||||
if (input_driver_flushing_input)
|
||||
{
|
||||
input_driver_flushing_input = false;
|
||||
if (ret)
|
||||
{
|
||||
ret = 0;
|
||||
if (runloop_paused)
|
||||
BIT64_SET(ret, RARCH_PAUSE_TOGGLE);
|
||||
input_driver_flushing_input = true;
|
||||
}
|
||||
}
|
||||
|
||||
*nonblock_state = input_driver_nonblock_state;
|
||||
|
||||
return ret;
|
||||
|
14
retroarch.c
14
retroarch.c
@ -241,6 +241,8 @@ static bool runloop_autosave = false;
|
||||
static retro_time_t frame_limit_minimum_time = 0.0;
|
||||
static retro_time_t frame_limit_last_time = 0.0;
|
||||
|
||||
extern bool input_driver_flushing_input;
|
||||
|
||||
static void retroarch_msg_queue_deinit(void)
|
||||
{
|
||||
if (!runloop_msg_queue)
|
||||
@ -2890,6 +2892,18 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||
runloop_paused,
|
||||
&input_driver_is_nonblock);
|
||||
|
||||
if (input_driver_flushing_input)
|
||||
{
|
||||
input_driver_flushing_input = false;
|
||||
if (current_input)
|
||||
{
|
||||
current_input = 0;
|
||||
if (runloop_paused)
|
||||
BIT64_SET(current_input, RARCH_PAUSE_TOGGLE);
|
||||
input_driver_flushing_input = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (runloop_frame_time.callback)
|
||||
{
|
||||
/* Updates frame timing if frame timing callback is in use by the core.
|
||||
|
Loading…
x
Reference in New Issue
Block a user