From 9d6f9b8c7401b41a402aff9a2ed058b3b6a0c1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 9 Jun 2015 14:13:51 +0700 Subject: [PATCH 1/3] (XMB) Fix icon display --- menu/drivers/xmb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index e888e551df..cdfbfe4722 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -955,8 +955,6 @@ static GLuint xmb_icon_get_id(xmb_handle_t *xmb, case MENU_FILE_PLAIN: return xmb->textures.list[XMB_TEXTURE_FILE].id; case MENU_FILE_PLAYLIST_ENTRY: - return xmb->textures.list[XMB_TEXTURE_FILE].id; - case MENU_FILE_CONTENTLIST_ENTRY: if (core_node) return core_node->content_icon; return xmb->textures.list[XMB_TEXTURE_FILE].id; @@ -1657,7 +1655,7 @@ static void xmb_context_reset_horizontal_list(xmb_handle_t *xmb, continue; } - info = (struct item_file*)&xmb->horizontal_list->list[i]; + info = (struct item_file*)&xmb->horizontal_list->list[i - 1]; if (!info) continue; From 23dabbf5e9ff9fa51e0973b06f5f09bd9ceee25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 9 Jun 2015 14:15:24 +0700 Subject: [PATCH 2/3] (XMB) Rename icon directory to xmb --- menu/drivers/xmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index cdfbfe4722..b1647b1e65 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1839,7 +1839,7 @@ static void xmb_context_reset(void) return; fill_pathname_join(mediapath, settings->assets_directory, - "lakka", sizeof(mediapath)); + "xmb", sizeof(mediapath)); fill_pathname_join(themepath, mediapath, XMB_THEME, sizeof(themepath)); fill_pathname_join(iconpath, themepath, xmb->icon.dir, sizeof(iconpath)); fill_pathname_slash(iconpath, sizeof(iconpath)); From 67b4c2f48e6b33344b4feccb09dbb272fa57991b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 9 Jun 2015 14:29:52 +0700 Subject: [PATCH 3/3] (XMB) Rename 256 to png, and code cleaning --- menu/drivers/xmb.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index b1647b1e65..c7bc76bb38 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1524,7 +1524,7 @@ static void *xmb_init(void) else if (width >= 320) scale_factor = 0.25; - strlcpy(xmb->icon.dir, "256", sizeof(xmb->icon.dir)); + strlcpy(xmb->icon.dir, "png", sizeof(xmb->icon.dir)); xmb->icon.size = 128.0 * scale_factor; xmb->cursor.size = 48.0; @@ -1629,19 +1629,13 @@ static bool xmb_load_image(void *data, menu_image_type_t type) static void xmb_context_reset_horizontal_list(xmb_handle_t *xmb, menu_handle_t *menu, const char *themepath) { - char iconpath[PATH_MAX_LENGTH]; unsigned i; global_t *global = global_get_ptr(); - core_info_list_t *info_list = global ? - (core_info_list_t*)global->core_info : NULL; size_t list_size = xmb_list_get_size(menu, MENU_LIST_HORIZONTAL); - if (!info_list) - return; - for (i = 1; i < list_size; i++) { - char core_id[PATH_MAX_LENGTH]; + char iconpath[PATH_MAX_LENGTH], sysname[PATH_MAX_LENGTH]; char texturepath[PATH_MAX_LENGTH], content_texturepath[PATH_MAX_LENGTH]; struct texture_image ti = {0}; xmb_node_t *node = xmb_get_userdata_from_horizontal_list( @@ -1660,16 +1654,16 @@ static void xmb_context_reset_horizontal_list(xmb_handle_t *xmb, if (!info) continue; - strlcpy(core_id, info->path, sizeof(core_id)); - path_remove_extension(core_id); + strlcpy(sysname, info->path, sizeof(sysname)); + path_remove_extension(sysname); fill_pathname_join(iconpath, themepath, xmb->icon.dir, sizeof(iconpath)); fill_pathname_slash(iconpath, sizeof(iconpath)); - fill_pathname_join(texturepath, iconpath, core_id, sizeof(texturepath)); + fill_pathname_join(texturepath, iconpath, sysname, sizeof(texturepath)); strlcat(texturepath, ".png", sizeof(texturepath)); - fill_pathname_join(content_texturepath, iconpath, core_id, sizeof(content_texturepath)); + fill_pathname_join(content_texturepath, iconpath, sysname, sizeof(content_texturepath)); strlcat(content_texturepath, "-content.png", sizeof(content_texturepath)); node->alpha = 0;