Skip to content

Commit

Permalink
(XMB) Cleanups #6
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Jun 6, 2015
1 parent a04c3ba commit 80eba21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion menu/drivers/glui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 6 additions & 7 deletions menu/drivers/xmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 80eba21

Please sign in to comment.