forked from len0rd/rockbox
fix loding of default remote viewers icons.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28288 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8123dffaea
commit
8bcb4927f3
1 changed files with 13 additions and 12 deletions
|
@ -198,8 +198,7 @@ enum Iconset {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static void load_icons(const char* filename, enum Iconset iconset,
|
static void load_icons(const char* filename, enum Iconset iconset)
|
||||||
bool allow_disable)
|
|
||||||
{
|
{
|
||||||
int size_read;
|
int size_read;
|
||||||
bool *loaded_ok = NULL;
|
bool *loaded_ok = NULL;
|
||||||
|
@ -235,7 +234,7 @@ static void load_icons(const char* filename, enum Iconset iconset,
|
||||||
}
|
}
|
||||||
|
|
||||||
*loaded_ok = false;
|
*loaded_ok = false;
|
||||||
if (!allow_disable || (filename[0] && filename[0] != '-'))
|
if (filename[0] && filename[0] != '-')
|
||||||
{
|
{
|
||||||
char path[MAX_PATH];
|
char path[MAX_PATH];
|
||||||
|
|
||||||
|
@ -251,32 +250,34 @@ static void load_icons(const char* filename, enum Iconset iconset,
|
||||||
|
|
||||||
void icons_init(void)
|
void icons_init(void)
|
||||||
{
|
{
|
||||||
load_icons(global_settings.icon_file, Iconset_Mainscreen, true);
|
load_icons(global_settings.icon_file, Iconset_Mainscreen);
|
||||||
|
|
||||||
if (*global_settings.viewers_icon_file)
|
if (global_settings.viewers_icon_file[0] &&
|
||||||
|
global_settings.viewers_icon_file[0] != '-')
|
||||||
{
|
{
|
||||||
load_icons(global_settings.viewers_icon_file,
|
load_icons(global_settings.viewers_icon_file,
|
||||||
Iconset_Mainscreen_viewers, true);
|
Iconset_Mainscreen_viewers);
|
||||||
read_viewer_theme_file();
|
read_viewer_theme_file();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
load_icons(DEFAULT_VIEWER_BMP, Iconset_Mainscreen_viewers, false);
|
load_icons(DEFAULT_VIEWER_BMP, Iconset_Mainscreen_viewers);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
|
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
|
||||||
load_icons(global_settings.remote_icon_file,
|
load_icons(global_settings.remote_icon_file,
|
||||||
Iconset_Remotescreen, true);
|
Iconset_Remotescreen);
|
||||||
|
|
||||||
if (*global_settings.remote_viewers_icon_file)
|
if (global_settings.remote_viewers_icon_file[0] &&
|
||||||
|
global_settings.remote_viewers_icon_file[0] != '-')
|
||||||
{
|
{
|
||||||
load_icons(global_settings.remote_viewers_icon_file,
|
load_icons(global_settings.remote_viewers_icon_file,
|
||||||
Iconset_Remotescreen_viewers, true);
|
Iconset_Remotescreen_viewers);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
load_icons(DEFAULT_REMOTE_VIEWER_BMP,
|
load_icons(DEFAULT_REMOTE_VIEWER_BMP,
|
||||||
Iconset_Remotescreen_viewers, false);
|
Iconset_Remotescreen_viewers);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue