mirror of
https://github.com/libretro/RetroArch
synced 2025-02-11 15:40:28 +00:00
Skip menu rendering and sleep when RARCH_MAIN_CTL_IS_IDLE is true
This commit is contained in:
parent
2b4464f30a
commit
b2613904ee
@ -925,14 +925,15 @@ int rarch_main_iterate(unsigned *sleep_ms)
|
|||||||
if (menu_driver_alive())
|
if (menu_driver_alive())
|
||||||
{
|
{
|
||||||
bool focused = check_focus(settings) && !ui_companion_is_on_foreground();
|
bool focused = check_focus(settings) && !ui_companion_is_on_foreground();
|
||||||
|
bool is_idle = rarch_main_ctl(RARCH_MAIN_CTL_IS_IDLE, NULL);
|
||||||
|
|
||||||
if (menu_driver_iterate((enum menu_action)menu_input_frame_retropad(input, trigger_input)) == -1)
|
if (menu_driver_iterate((enum menu_action)menu_input_frame_retropad(input, trigger_input)) == -1)
|
||||||
rarch_ctl(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED, NULL);
|
rarch_ctl(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED, NULL);
|
||||||
|
|
||||||
if (focused)
|
if (focused || !is_idle)
|
||||||
menu_iterate_render();
|
menu_iterate_render();
|
||||||
|
|
||||||
if (!focused)
|
if (!focused || is_idle)
|
||||||
{
|
{
|
||||||
*sleep_ms = 10;
|
*sleep_ms = 10;
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user