diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2024-11-15 03:14:19 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2024-11-16 12:14:00 -0500 |
commit | 953fcef05e5868ca9f66351c6152a3c3c1274107 (patch) | |
tree | d50d2b403442e0ab795718574c53380732be576f | |
parent | ff2f9123f6216fc8ab03e2cb4a50b5924bf9e8c4 (diff) | |
download | rockbox-953fcef05e.tar.gz rockbox-953fcef05e.zip |
gui: Fix unsuccesful attempt at loading default viewer iconset
The default viewer icons file seems to have
been removed in the rewrite of buildzip.pl
(see commit 66b6fdb).
So, this only worked accidentally, once some
theme put a viewers.bmp file in the icons folder,
potentially leading to confusing behavior.
Deactivating viewer icons (instead of reverting
to some default file) when they are set to "-"
is probably expected behavior at this point.
Change-Id: I5010764676c67592bf20abfb3d0780edb1d555d4
-rw-r--r-- | apps/gui/icon.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 7a59a72151..50fa0034ab 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -39,10 +39,6 @@ #include "bitmaps/remote_default_icons.h" #endif -/* These are just the file names, the full path is snprint'ed when used */ -#define DEFAULT_VIEWER_BMP "viewers" -#define DEFAULT_REMOTE_VIEWER_BMP "remote_viewers" - /* We dont actually do anything with these pointers, but they need to be grouped like this to save code so storing them as void* is ok. (stops compile warning) */ @@ -211,12 +207,8 @@ void icons_init(void) { load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN); - if (global_settings.viewers_icon_file[0] == '-' || - global_settings.viewers_icon_file[0] == '\0') - { - load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN); - } - else + if (global_settings.viewers_icon_file[0] != '-' && + global_settings.viewers_icon_file[0] != '\0') { load_icons(global_settings.viewers_icon_file, Iconset_viewers, SCREEN_MAIN); @@ -226,13 +218,8 @@ void icons_init(void) load_icons(global_settings.remote_icon_file, Iconset_user, SCREEN_REMOTE); - if (global_settings.remote_viewers_icon_file[0] == '-' || - global_settings.remote_viewers_icon_file[0] == '\0') - { - load_icons(DEFAULT_REMOTE_VIEWER_BMP, - Iconset_viewers, SCREEN_REMOTE); - } - else + if (global_settings.remote_viewers_icon_file[0] != '-' && + global_settings.remote_viewers_icon_file[0] != '\0') { load_icons(global_settings.remote_viewers_icon_file, Iconset_viewers, SCREEN_REMOTE); |