Cleanups
This commit is contained in:
parent
5b76402e6b
commit
3d2cc8b14a
|
@ -281,6 +281,22 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
|
||||||
fill_pathname_slash(s2, sizeof(s2));
|
fill_pathname_slash(s2, sizeof(s2));
|
||||||
strlcpy(s, s2, len);
|
strlcpy(s, s2, len);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
case APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG:
|
||||||
|
#ifdef HAVE_XMB
|
||||||
|
{
|
||||||
|
char s1[PATH_MAX_LENGTH] = {0};
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
|
fill_pathname_application_special(s1, sizeof(s1),
|
||||||
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||||
|
|
||||||
|
if (*settings->path.menu_wallpaper)
|
||||||
|
strlcpy(s, settings->path.menu_wallpaper, len);
|
||||||
|
else
|
||||||
|
fill_pathname_join(s, s1, "bg.png", len);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB:
|
case APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB:
|
||||||
|
|
|
@ -29,6 +29,7 @@ enum application_special_type
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_ICONS,
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_ICONS,
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB,
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB,
|
||||||
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG,
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS,
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS,
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT
|
||||||
};
|
};
|
||||||
|
|
|
@ -383,21 +383,6 @@ static float *xmb_gradient_ident(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void xmb_fill_default_background_path(xmb_handle_t *xmb,
|
|
||||||
char *path, size_t size)
|
|
||||||
{
|
|
||||||
char iconpath[PATH_MAX_LENGTH] = {0};
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
fill_pathname_application_special(iconpath, sizeof(iconpath),
|
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
|
||||||
|
|
||||||
fill_pathname_join(path, iconpath, "bg.png", size);
|
|
||||||
|
|
||||||
if (*settings->path.menu_wallpaper)
|
|
||||||
strlcpy(path, settings->path.menu_wallpaper, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
static size_t xmb_list_get_selection(void *data)
|
static size_t xmb_list_get_selection(void *data)
|
||||||
{
|
{
|
||||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||||
|
@ -1060,7 +1045,8 @@ static void xmb_list_switch_new(xmb_handle_t *xmb,
|
||||||
strlcat(path, ".png", sizeof(path));
|
strlcat(path, ".png", sizeof(path));
|
||||||
|
|
||||||
if (!path_file_exists(path))
|
if (!path_file_exists(path))
|
||||||
xmb_fill_default_background_path(xmb, path, sizeof(path));
|
fill_pathname_application_special(path, sizeof(path),
|
||||||
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG);
|
||||||
|
|
||||||
if(!string_is_equal(path, xmb->background_file_path))
|
if(!string_is_equal(path, xmb->background_file_path))
|
||||||
{
|
{
|
||||||
|
@ -2787,8 +2773,9 @@ static void xmb_context_reset(void *data)
|
||||||
if (!xmb)
|
if (!xmb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
xmb_fill_default_background_path(xmb,
|
fill_pathname_application_special(xmb->background_file_path,
|
||||||
xmb->background_file_path, sizeof(xmb->background_file_path));
|
sizeof(xmb->background_file_path),
|
||||||
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG);
|
||||||
|
|
||||||
fill_pathname_application_special(iconpath, sizeof(iconpath),
|
fill_pathname_application_special(iconpath, sizeof(iconpath),
|
||||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_ICONS);
|
||||||
|
|
Loading…
Reference in New Issue