mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-14 22:47:44 +00:00
Cleanups pt. 3
This commit is contained in:
parent
b09f43ab3a
commit
7831fd6fc0
20
menu/menu.c
20
menu/menu.c
@ -100,7 +100,7 @@ bool menu_load_content(enum rarch_core_type type)
|
||||
if (disp)
|
||||
disp->msg_force = true;
|
||||
|
||||
menu_iterate_main(MENU_ACTION_NOOP);
|
||||
menu_iterate(MENU_ACTION_NOOP);
|
||||
menu_iterate_main_render();
|
||||
|
||||
if (!(main_load_content(0, NULL, NULL, menu_environment_get,
|
||||
@ -333,21 +333,3 @@ void menu_free(menu_handle_t *menu)
|
||||
|
||||
free(menu);
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_iterate:
|
||||
* @input : input sample for this frame
|
||||
* @old_input : input sample of the previous frame
|
||||
* @trigger_input : difference' input sample - difference
|
||||
* between 'input' and 'old_input'
|
||||
*
|
||||
* Runs RetroArch menu for one frame.
|
||||
*
|
||||
* Returns: 0 on success, -1 if we need to quit out of the loop.
|
||||
**/
|
||||
int menu_iterate(retro_input_t input,
|
||||
retro_input_t old_input, retro_input_t trigger_input)
|
||||
{
|
||||
menu_animation_update_time();
|
||||
return menu_iterate_main(menu_input_frame(input, trigger_input));
|
||||
}
|
||||
|
10
menu/menu.h
10
menu/menu.h
@ -165,19 +165,13 @@ void *menu_init(const void *data);
|
||||
|
||||
/**
|
||||
* menu_iterate:
|
||||
* @input : input sample for this frame
|
||||
* @old_input : input sample of the previous frame
|
||||
* @trigger_input : difference' input sample - difference
|
||||
* between 'input' and 'old_input'
|
||||
* @action : Associated action for this frame
|
||||
*
|
||||
* Runs RetroArch menu for one frame.
|
||||
*
|
||||
* Returns: 0 on success, -1 if we need to quit out of the loop.
|
||||
**/
|
||||
int menu_iterate(retro_input_t input,
|
||||
retro_input_t old_input, retro_input_t trigger_input);
|
||||
|
||||
int menu_iterate_main(unsigned action);
|
||||
int menu_iterate(unsigned action);
|
||||
|
||||
int menu_iterate_main_render(void);
|
||||
|
||||
|
@ -412,7 +412,18 @@ static enum action_iterate_type action_iterate_type(uint32_t hash)
|
||||
return ITERATE_TYPE_DEFAULT;
|
||||
}
|
||||
|
||||
int menu_iterate_main(unsigned action)
|
||||
/**
|
||||
* menu_iterate:
|
||||
* @input : input sample for this frame
|
||||
* @old_input : input sample of the previous frame
|
||||
* @trigger_input : difference' input sample - difference
|
||||
* between 'input' and 'old_input'
|
||||
*
|
||||
* Runs RetroArch menu for one frame.
|
||||
*
|
||||
* Returns: 0 on success, -1 if we need to quit out of the loop.
|
||||
**/
|
||||
int menu_iterate(unsigned action)
|
||||
{
|
||||
menu_entry_t entry;
|
||||
enum action_iterate_type iterate_type;
|
||||
@ -425,7 +436,9 @@ int menu_iterate_main(unsigned action)
|
||||
menu_display_t *disp = menu_display_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
|
||||
menu_animation_update_time();
|
||||
menu_list_get_last_stack(menu_list, NULL, &label, NULL, NULL);
|
||||
|
||||
if (!menu || !menu_list)
|
||||
return 0;
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu.h"
|
||||
#include "menu/menu_input.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETPLAY
|
||||
@ -1038,7 +1039,7 @@ int rarch_main_iterate(void)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (menu)
|
||||
if (menu_iterate(input, old_input, trigger_input) == -1)
|
||||
if (menu_iterate(menu_input_frame(input, trigger_input)) == -1)
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
|
||||
if (!input && settings->menu.pause_libretro)
|
||||
|
@ -478,7 +478,7 @@ static int ui_companion_cocoatouch_iterate(void *data, unsigned action)
|
||||
|
||||
static int ui_companion_cocoatouch_iterate_menu(void *data, unsigned action)
|
||||
{
|
||||
menu_iterate(0, 0, 0);
|
||||
menu_iterate(MENU_ACTION_NOOP);
|
||||
rarch_main_set_state(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user