mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-08 04:39:34 +00:00
Refactor away input_flush
This commit is contained in:
parent
4cc71c0574
commit
a1e6313453
30
runloop.c
30
runloop.c
@ -781,26 +781,6 @@ static INLINE retro_input_t input_keys_pressed(driver_t *driver,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* input_flush:
|
||||
* @input : input sample for this frame
|
||||
*
|
||||
* Resets input sample.
|
||||
*
|
||||
* Returns: always true (1).
|
||||
**/
|
||||
static bool input_flush(retro_input_t *input)
|
||||
{
|
||||
*input = 0;
|
||||
|
||||
/* If core was paused before entering menu, evoke
|
||||
* pause toggle to wake it up. */
|
||||
if (main_is_paused)
|
||||
BIT64_SET(*input, RARCH_PAUSE_TOGGLE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* rarch_main_load_dummy_core:
|
||||
*
|
||||
@ -1048,7 +1028,15 @@ int rarch_main_iterate(void)
|
||||
last_input = input;
|
||||
|
||||
if (driver->flushing_input)
|
||||
driver->flushing_input = (input) ? input_flush(&input) : false;
|
||||
{
|
||||
input = 0;
|
||||
/* If core was paused before entering menu, evoke
|
||||
* pause toggle to wake it up. */
|
||||
if (main_is_paused)
|
||||
BIT64_SET(input, RARCH_PAUSE_TOGGLE);
|
||||
|
||||
driver->flushing_input = false;
|
||||
}
|
||||
|
||||
trigger_input = input & ~old_input;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user