(MaterialUI) Use fill_pathname_application_directory

This commit is contained in:
twinaphex 2016-06-11 19:41:26 +02:00
parent 78904911ca
commit 92bba6e46e
3 changed files with 20 additions and 6 deletions

View File

@ -299,6 +299,21 @@ void fill_pathname_application_directory(char *s, size_t len, enum application_d
s1, xmb_theme_ident(), sizeof(s2)); s1, xmb_theme_ident(), sizeof(s2));
strlcpy(s, s2, len); 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 #endif
break; break;
case APPLICATION_DIRECTORY_NONE: case APPLICATION_DIRECTORY_NONE:

View File

@ -25,6 +25,7 @@
enum application_directory enum application_directory
{ {
APPLICATION_DIRECTORY_NONE = 0, APPLICATION_DIRECTORY_NONE = 0,
APPLICATION_DIRECTORY_ASSETS_MATERIALUI_ICONS,
APPLICATION_DIRECTORY_ASSETS_XMB, APPLICATION_DIRECTORY_ASSETS_XMB,
APPLICATION_DIRECTORY_ASSETS_XMB_ICONS APPLICATION_DIRECTORY_ASSETS_XMB_ICONS
}; };

View File

@ -45,6 +45,8 @@
#include "../../verbosity.h" #include "../../verbosity.h"
#include "../../tasks/tasks_internal.h" #include "../../tasks/tasks_internal.h"
#include "../../file_path_special.h"
enum enum
{ {
MUI_TEXTURE_POINTER = 0, MUI_TEXTURE_POINTER = 0,
@ -1239,12 +1241,8 @@ static void mui_context_reset(void *data)
if (!mui || !settings) if (!mui || !settings)
return; return;
fill_pathname_join( fill_pathname_application_directory(iconpath, sizeof(iconpath),
iconpath, APPLICATION_DIRECTORY_ASSETS_MATERIALUI_ICONS);
settings->directory.assets,
"glui",
sizeof(iconpath));
fill_pathname_slash(iconpath, sizeof(iconpath));
mui_layout(mui); mui_layout(mui);
mui_context_bg_destroy(mui); mui_context_bg_destroy(mui);