Always assume we are going to render when calling menu_driver_iterate

This commit is contained in:
twinaphex 2015-10-11 12:58:21 +02:00
parent 721d566f99
commit 528a020d86
6 changed files with 12 additions and 18 deletions

View File

@ -202,7 +202,7 @@ static enum action_iterate_type action_iterate_type(uint32_t hash)
* *
* Returns: 0 on success, -1 if we need to quit out of the loop. * Returns: 0 on success, -1 if we need to quit out of the loop.
**/ **/
int generic_menu_iterate(bool render_this_frame, enum menu_action action) int generic_menu_iterate(enum menu_action action)
{ {
size_t selection; size_t selection;
menu_entry_t entry; menu_entry_t entry;
@ -227,7 +227,6 @@ int generic_menu_iterate(bool render_this_frame, enum menu_action action)
if (action != MENU_ACTION_NOOP || menu_entries_needs_refresh() || menu_display_ctl(MENU_DISPLAY_CTL_UPDATE_PENDING, NULL)) if (action != MENU_ACTION_NOOP || menu_entries_needs_refresh() || menu_display_ctl(MENU_DISPLAY_CTL_UPDATE_PENDING, NULL))
{ {
if (render_this_frame)
BIT64_SET(menu->state, MENU_STATE_RENDER_FRAMEBUFFER); BIT64_SET(menu->state, MENU_STATE_RENDER_FRAMEBUFFER);
} }
@ -299,7 +298,6 @@ int generic_menu_iterate(bool render_this_frame, enum menu_action action)
break; break;
} }
if (render_this_frame)
BIT64_SET(menu->state, MENU_STATE_BLIT); BIT64_SET(menu->state, MENU_STATE_BLIT);
if (BIT64_GET(menu->state, MENU_STATE_POP_STACK)) if (BIT64_GET(menu->state, MENU_STATE_POP_STACK))

View File

@ -39,7 +39,7 @@ enum action_iterate_type
ITERATE_TYPE_BIND ITERATE_TYPE_BIND
}; };
int generic_menu_iterate(bool render_this_frame, enum menu_action action); int generic_menu_iterate(enum menu_action action);
bool generic_menu_init_list(void *data); bool generic_menu_init_list(void *data);

View File

@ -1172,7 +1172,7 @@ static void zarch_context_reset(void)
zui_font(menu); zui_font(menu);
} }
static int zarch_iterate(bool render_this_frame, enum menu_action action) static int zarch_iterate(enum menu_action action)
{ {
zui_t *zui = NULL; zui_t *zui = NULL;
menu_handle_t *menu = menu_driver_get_ptr(); menu_handle_t *menu = menu_driver_get_ptr();
@ -1185,11 +1185,8 @@ static int zarch_iterate(bool render_this_frame, enum menu_action action)
if (!zui) if (!zui)
return -1; return -1;
if (render_this_frame)
{
BIT64_SET(menu->state, MENU_STATE_RENDER_FRAMEBUFFER); BIT64_SET(menu->state, MENU_STATE_RENDER_FRAMEBUFFER);
BIT64_SET(menu->state, MENU_STATE_BLIT); BIT64_SET(menu->state, MENU_STATE_BLIT);
}
switch (action) switch (action)
{ {
@ -1209,7 +1206,6 @@ static int zarch_iterate(bool render_this_frame, enum menu_action action)
break; break;
} }
if (zui->time_to_exit) if (zui->time_to_exit)
{ {
RARCH_LOG("Gets here.\n"); RARCH_LOG("Gets here.\n");

View File

@ -331,12 +331,12 @@ bool menu_driver_alive(void)
return menu_alive; return menu_alive;
} }
int menu_driver_iterate(bool render, enum menu_action action) int menu_driver_iterate(enum menu_action action)
{ {
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr(); const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
if (driver->iterate) if (driver->iterate)
return driver->iterate(render, action); return driver->iterate(action);
return -1; return -1;
} }

View File

@ -108,7 +108,7 @@ typedef struct menu_ctx_driver
{ {
void (*set_texture)(void); void (*set_texture)(void);
void (*render_messagebox)(const char *msg); void (*render_messagebox)(const char *msg);
int (*iterate)(bool render, enum menu_action action); int (*iterate)(enum menu_action action);
void (*render)(void); void (*render)(void);
void (*frame)(void); void (*frame)(void);
void* (*init)(void); void* (*init)(void);
@ -219,7 +219,7 @@ size_t menu_driver_list_get_selection(void);
bool menu_environment_cb(menu_environ_cb_t type, void *data); bool menu_environment_cb(menu_environ_cb_t type, void *data);
int menu_driver_iterate(bool render, enum menu_action action); int menu_driver_iterate(enum menu_action action);
int menu_driver_bind_init(menu_file_list_cbs_t *cbs, int menu_driver_bind_init(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx, const char *path, const char *label, unsigned type, size_t idx,

View File

@ -979,7 +979,7 @@ int rarch_main_iterate(unsigned *sleep_ms)
#ifdef HAVE_MENU #ifdef HAVE_MENU
if (menu_driver_alive()) if (menu_driver_alive())
{ {
if (menu_driver_iterate(true, (enum menu_action)menu_input_frame(input, trigger_input)) == -1) if (menu_driver_iterate((enum menu_action)menu_input_frame(input, trigger_input)) == -1)
rarch_ctl(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED, NULL); rarch_ctl(RARCH_ACTION_STATE_MENU_RUNNING_FINISHED, NULL);
if (!input && settings->menu.pause_libretro) if (!input && settings->menu.pause_libretro)