diff --git a/menu/cbs/menu_cbs_left.c b/menu/cbs/menu_cbs_left.c index d0a5f5575c..33937d1445 100644 --- a/menu/cbs/menu_cbs_left.c +++ b/menu/cbs/menu_cbs_left.c @@ -239,6 +239,7 @@ static int action_left_cheat_num_passes(unsigned type, const char *label, { unsigned new_size = 0; global_t *global = global_get_ptr(); + menu_handle_t *menu = menu_driver_get_ptr(); cheat_manager_t *cheat = global->cheat; if (!cheat) @@ -247,6 +248,7 @@ static int action_left_cheat_num_passes(unsigned type, const char *label, if (cheat_manager_get_size(cheat)) new_size = cheat_manager_get_size(cheat) - 1; menu_entries_set_refresh(false); + menu->prevent_populate = true; cheat_manager_realloc(cheat, new_size); return 0; @@ -268,6 +270,7 @@ static int action_left_shader_num_passes(unsigned type, const char *label, if (shader->passes) shader->passes--; menu_entries_set_refresh(false); + menu->prevent_populate = true; video_shader_resolve_parameters(NULL, menu->shader); #endif diff --git a/menu/cbs/menu_cbs_right.c b/menu/cbs/menu_cbs_right.c index e04eca879e..df46bf703b 100644 --- a/menu/cbs/menu_cbs_right.c +++ b/menu/cbs/menu_cbs_right.c @@ -264,6 +264,7 @@ static int action_right_cheat_num_passes(unsigned type, const char *label, { unsigned new_size = 0; global_t *global = global_get_ptr(); + menu_handle_t *menu = menu_driver_get_ptr(); cheat_manager_t *cheat = global->cheat; if (!cheat) @@ -271,6 +272,7 @@ static int action_right_cheat_num_passes(unsigned type, const char *label, new_size = cheat_manager_get_size(cheat) + 1; menu_entries_set_refresh(false); + menu->prevent_populate = true; cheat_manager_realloc(cheat, new_size); return 0; @@ -292,6 +294,7 @@ static int action_right_shader_num_passes(unsigned type, const char *label, if ((shader->passes < GFX_MAX_SHADERS)) shader->passes++; menu_entries_set_refresh(false); + menu->prevent_populate = true; video_shader_resolve_parameters(NULL, menu->shader); #endif diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index b86b267972..693f14ec9f 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -218,7 +218,6 @@ typedef struct xmb_handle xmb_node_t settings_tab_node; xmb_node_t history_tab_node; xmb_node_t add_tab_node; - bool prevent_populate; gfx_font_raster_block_t raster_block; } xmb_handle_t; @@ -1113,7 +1112,7 @@ static void xmb_refresh_horizontal_list(xmb_handle_t *xmb, free(xmb->horizontal_list); xmb->horizontal_list = NULL; - xmb->prevent_populate = true; + menu->prevent_populate = true; xmb_init_horizontal_list(menu, xmb); xmb_context_reset_horizontal_list(xmb, menu, themepath); @@ -1205,10 +1204,10 @@ static void xmb_populate_entries(const char *path, if (!xmb) return; - if (xmb->prevent_populate) + if (menu->prevent_populate) { xmb_selection_pointer_changed(false); - xmb->prevent_populate = false; + menu->prevent_populate = false; return; } @@ -1974,7 +1973,7 @@ static void *xmb_init(void) xmb->depth = 1; xmb->old_depth = 1; xmb->alpha = 0; - xmb->prevent_populate = false; + menu->prevent_populate = false; /* TODO/FIXME - we don't use framebuffer at all * for XMB, we should refactor this dependency @@ -2571,7 +2570,7 @@ static void xmb_toggle(bool menu_on) menu_animation_push(XMB_DELAY, 1.0f, &xmb->alpha, EASING_IN_OUT_QUAD, -1, NULL); - xmb->prevent_populate = !menu_entries_needs_refresh(); + menu->prevent_populate = !menu_entries_needs_refresh(); xmb_toggle_horizontal_list(xmb, menu); } diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 6897e01cc4..9a205c9e79 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -94,6 +94,8 @@ typedef struct content_playlist_t *playlist; char db_playlist_file[PATH_MAX_LENGTH]; + + bool prevent_populate; /* xmb hack */ } menu_handle_t; typedef struct menu_ctx_driver