From 92bba6e46e35198a96c67ec80f8c53ed1da7b71c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 11 Jun 2016 19:41:26 +0200 Subject: [PATCH] (MaterialUI) Use fill_pathname_application_directory --- file_path_special.c | 15 +++++++++++++++ file_path_special.h | 1 + menu/drivers/materialui.c | 10 ++++------ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/file_path_special.c b/file_path_special.c index ebec0fb933..5d5c8a7a19 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -299,6 +299,21 @@ void fill_pathname_application_directory(char *s, size_t len, enum application_d s1, xmb_theme_ident(), sizeof(s2)); strlcpy(s, s2, len); } +#endif + break; + case APPLICATION_DIRECTORY_ASSETS_MATERIALUI_ICONS: +#ifdef HAVE_MATERIALUI + { + char s1[PATH_MAX_LENGTH] = {0}; + settings_t *settings = config_get_ptr(); + fill_pathname_join( + s1, + settings->directory.assets, + "glui", + sizeof(s1)); + fill_pathname_slash(s1, sizeof(s1)); + strlcpy(s, s1, len); + } #endif break; case APPLICATION_DIRECTORY_NONE: diff --git a/file_path_special.h b/file_path_special.h index 9b1be32c25..c7094a0790 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -25,6 +25,7 @@ enum application_directory { APPLICATION_DIRECTORY_NONE = 0, + APPLICATION_DIRECTORY_ASSETS_MATERIALUI_ICONS, APPLICATION_DIRECTORY_ASSETS_XMB, APPLICATION_DIRECTORY_ASSETS_XMB_ICONS }; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index c1eb82e754..a02bc3b4ad 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -45,6 +45,8 @@ #include "../../verbosity.h" #include "../../tasks/tasks_internal.h" +#include "../../file_path_special.h" + enum { MUI_TEXTURE_POINTER = 0, @@ -1239,12 +1241,8 @@ static void mui_context_reset(void *data) if (!mui || !settings) return; - fill_pathname_join( - iconpath, - settings->directory.assets, - "glui", - sizeof(iconpath)); - fill_pathname_slash(iconpath, sizeof(iconpath)); + fill_pathname_application_directory(iconpath, sizeof(iconpath), + APPLICATION_DIRECTORY_ASSETS_MATERIALUI_ICONS); mui_layout(mui); mui_context_bg_destroy(mui);