mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
Bring back input_flush
This commit is contained in:
parent
6cee3c6701
commit
d279b158c9
22
runloop.c
22
runloop.c
@ -983,6 +983,18 @@ static void rarch_main_cmd_get_state(driver_t *driver,
|
|||||||
RARCH_CHEAT_TOGGLE);
|
RARCH_CHEAT_TOGGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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_iterate:
|
* rarch_main_iterate:
|
||||||
*
|
*
|
||||||
@ -1008,15 +1020,7 @@ int rarch_main_iterate(void)
|
|||||||
last_input = input;
|
last_input = input;
|
||||||
|
|
||||||
if (driver->flushing_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;
|
trigger_input = input & ~old_input;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user