Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+4 -17
+4 -17
apps/gui/icon.c
··· 39 39 #include "bitmaps/remote_default_icons.h" 40 40 #endif 41 41 42 - /* These are just the file names, the full path is snprint'ed when used */ 43 - #define DEFAULT_VIEWER_BMP "viewers" 44 - #define DEFAULT_REMOTE_VIEWER_BMP "remote_viewers" 45 - 46 42 /* We dont actually do anything with these pointers, 47 43 but they need to be grouped like this to save code 48 44 so storing them as void* is ok. (stops compile warning) */ ··· 211 207 { 212 208 load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN); 213 209 214 - if (global_settings.viewers_icon_file[0] == '-' || 215 - global_settings.viewers_icon_file[0] == '\0') 216 - { 217 - load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN); 218 - } 219 - else 210 + if (global_settings.viewers_icon_file[0] != '-' && 211 + global_settings.viewers_icon_file[0] != '\0') 220 212 { 221 213 load_icons(global_settings.viewers_icon_file, 222 214 Iconset_viewers, SCREEN_MAIN); ··· 226 218 load_icons(global_settings.remote_icon_file, 227 219 Iconset_user, SCREEN_REMOTE); 228 220 229 - if (global_settings.remote_viewers_icon_file[0] == '-' || 230 - global_settings.remote_viewers_icon_file[0] == '\0') 231 - { 232 - load_icons(DEFAULT_REMOTE_VIEWER_BMP, 233 - Iconset_viewers, SCREEN_REMOTE); 234 - } 235 - else 221 + if (global_settings.remote_viewers_icon_file[0] != '-' && 222 + global_settings.remote_viewers_icon_file[0] != '\0') 236 223 { 237 224 load_icons(global_settings.remote_viewers_icon_file, 238 225 Iconset_viewers, SCREEN_REMOTE);