From 80eba218880b7c7564fa31bdc8abaa423705bc88 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sat, 6 Jun 2015 12:53:55 +0200 Subject: [PATCH] (XMB) Cleanups #6 --- menu/drivers/glui.c | 2 +- menu/drivers/xmb.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/menu/drivers/glui.c b/menu/drivers/glui.c index 443f477b2c..5a8653d195 100644 --- a/menu/drivers/glui.c +++ b/menu/drivers/glui.c @@ -301,7 +301,7 @@ static void glui_render_menu_list(glui_handle_t *glui, y = menu->header_height - menu->scroll_y + (glui->line_height * i); - if (y > height || y + glui->line_height < 0) + if (y > height || ((y + glui->line_height) < 0)) continue; entry_selected = menu_entry_is_currently_selected(i); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 86bd3970ea..72b61cb105 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1558,15 +1558,12 @@ static void xmb_context_reset(void) { unsigned i, k; char mediapath[PATH_MAX_LENGTH], themepath[PATH_MAX_LENGTH], - iconpath[PATH_MAX_LENGTH], fontpath[PATH_MAX_LENGTH], - core_id[PATH_MAX_LENGTH], texturepath[PATH_MAX_LENGTH], - content_texturepath[PATH_MAX_LENGTH]; + iconpath[PATH_MAX_LENGTH], fontpath[PATH_MAX_LENGTH]; struct texture_image ti = {0}; core_info_list_t* info_list = NULL; gl_t *gl = NULL; xmb_handle_t *xmb = NULL; - xmb_node_t *node = NULL; menu_handle_t *menu = menu_driver_get_ptr(); settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); @@ -1682,9 +1679,12 @@ static void xmb_context_reset(void) for (i = 1; i < menu->categories.size; i++) { + char core_id[PATH_MAX_LENGTH]; + char texturepath[PATH_MAX_LENGTH], content_texturepath[PATH_MAX_LENGTH]; core_info_t *info = NULL; - struct texture_image ti = {0}; - node = xmb_get_userdata_from_core(xmb, info, i - 1); + struct texture_image ti = {0}; + xmb_node_t *node = xmb_get_userdata_from_core( + xmb, info, i - 1); if (!node) { @@ -1731,7 +1731,6 @@ static void xmb_context_reset(void) TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR); texture_image_free(&ti); - texture_image_load(&ti, content_texturepath); node->content_icon = video_texture_load(&ti,