mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 18:50:29 +00:00
Main menu loop now does rendering, data runloop does actual
state handling
This commit is contained in:
parent
ef94cd7606
commit
297a63c77b
15
runloop.c
15
runloop.c
@ -993,6 +993,8 @@ static void rarch_main_cmd_get_state(driver_t *driver,
|
||||
RARCH_CHEAT_TOGGLE);
|
||||
}
|
||||
|
||||
unsigned menu_input_this_frame;
|
||||
|
||||
/**
|
||||
* rarch_main_iterate:
|
||||
*
|
||||
@ -1077,16 +1079,19 @@ int rarch_main_iterate(unsigned *sleep_ms)
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_input_this_frame = 0;
|
||||
if (menu_driver_alive())
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (menu)
|
||||
if (menu_iterate(true, menu_input_frame(input, trigger_input)) == -1)
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
{
|
||||
menu_input_this_frame = menu_input_frame(input, trigger_input);
|
||||
menu_iterate_render();
|
||||
|
||||
if (!input && settings->menu.pause_libretro)
|
||||
return 1;
|
||||
return rarch_limit_frame_time(settings->fastforward_ratio, sleep_ms);
|
||||
if (!input && settings->menu.pause_libretro)
|
||||
return 1;
|
||||
return rarch_limit_frame_time(settings->fastforward_ratio, sleep_ms);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "general.h"
|
||||
#include "retroarch.h"
|
||||
|
||||
#include "tasks/tasks.h"
|
||||
#include "input/input_overlay.h"
|
||||
@ -209,14 +210,16 @@ error:
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
extern unsigned menu_input_this_frame;
|
||||
|
||||
static void rarch_main_data_menu_iterate(void)
|
||||
{
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
if (rarch_main_data_db_pending_scan_finished())
|
||||
menu_environment_cb(MENU_ENVIRON_RESET_HORIZONTAL_LIST, NULL);
|
||||
#endif
|
||||
|
||||
menu_iterate_render();
|
||||
if (menu_iterate(true, menu_input_this_frame) == -1)
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user