(XMB) Create xmb_context_reset_background

This commit is contained in:
Twinaphex 2015-06-06 14:01:36 +02:00
parent 00e90a752d
commit c49262eb8c

View File

@ -1743,6 +1743,21 @@ static void xmb_context_reset_textures(xmb_handle_t *xmb, const char *iconpath)
xmb->settings_node.zoom = xmb->categories.active.zoom; xmb->settings_node.zoom = xmb->categories.active.zoom;
} }
static void xmb_context_reset_background(const char *iconpath)
{
char path[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
fill_pathname_join(path, iconpath, "bg.png", sizeof(path));
if (*settings->menu.wallpaper)
strlcpy(path, settings->menu.wallpaper, sizeof(path));
if (path_file_exists(path))
rarch_main_data_msg_queue_push(DATA_TYPE_IMAGE, path,
"cb_menu_wallpaper", 0, 1, true);
}
static void xmb_context_reset(void) static void xmb_context_reset(void)
{ {
char mediapath[PATH_MAX_LENGTH], themepath[PATH_MAX_LENGTH], char mediapath[PATH_MAX_LENGTH], themepath[PATH_MAX_LENGTH],
@ -1776,20 +1791,7 @@ static void xmb_context_reset(void)
RARCH_WARN("Failed to load font."); RARCH_WARN("Failed to load font.");
xmb_context_reset_textures(xmb, iconpath); xmb_context_reset_textures(xmb, iconpath);
xmb_context_reset_background(iconpath);
{
char path[PATH_MAX_LENGTH];
fill_pathname_join(path, iconpath, "bg.png", sizeof(path));
if (*settings->menu.wallpaper)
strlcpy(path, settings->menu.wallpaper, sizeof(path));
if ( path_file_exists(path))
rarch_main_data_msg_queue_push(DATA_TYPE_IMAGE, path,
"cb_menu_wallpaper", 0, 1, true);
}
xmb_context_reset_horizontal_list(xmb, themepath); xmb_context_reset_horizontal_list(xmb, themepath);
} }