From c254c69c1ac612b638a3593e8cec56a2c9834b70 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 11 Jun 2016 19:46:37 +0200 Subject: [PATCH] Use fill_pathname_application_path --- file_path_special.c | 21 ++++++++++++++++----- file_path_special.h | 1 + menu/drivers/materialui.c | 4 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/file_path_special.c b/file_path_special.c index 5d5c8a7a19..54aa3921ac 100644 --- a/file_path_special.c +++ b/file_path_special.c @@ -299,6 +299,19 @@ 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: +#ifdef HAVE_MATERIALUI + { + settings_t *settings = config_get_ptr(); + + fill_pathname_join( + s, + settings->directory.assets, + "glui", + len); + } #endif break; case APPLICATION_DIRECTORY_ASSETS_MATERIALUI_ICONS: @@ -306,11 +319,9 @@ void fill_pathname_application_directory(char *s, size_t len, enum application_d { char s1[PATH_MAX_LENGTH] = {0}; settings_t *settings = config_get_ptr(); - fill_pathname_join( - s1, - settings->directory.assets, - "glui", - sizeof(s1)); + + fill_pathname_application_directory(s1, + sizeof(s1), APPLICATION_DIRECTORY_ASSETS_MATERIALUI); fill_pathname_slash(s1, sizeof(s1)); strlcpy(s, s1, len); } diff --git a/file_path_special.h b/file_path_special.h index c7094a0790..b43dcf1685 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, 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 7b92a07ee5..9cfeab28ae 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1010,8 +1010,8 @@ static void mui_font(void) settings_t *settings = config_get_ptr(); int font_size = menu_display_get_font_size(); - fill_pathname_join(mediapath, settings->directory.assets, - "glui", sizeof(mediapath)); + fill_pathname_application_directory(mediapath, sizeof(mediapath), + APPLICATION_DIRECTORY_ASSETS_MATERIALUI); fill_pathname_join(fontpath, mediapath, "Roboto-Regular.ttf", sizeof(fontpath));