Refactor away input_flush

This commit is contained in:
twinaphex 2015-08-05 14:24:21 +02:00
parent 4cc71c0574
commit a1e6313453

View File

@ -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;