diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-16 14:33:29 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-16 14:33:29 +0000 |
commit | a9c1df40014ebe548ab111fd28d854f22e231b5f (patch) | |
tree | b663992bcc82b56095900dd378cc1eb8dfa81a6a /apps/gui/icon.c | |
parent | b6658bbeef45b3b2db730bb8ca2bf0309d2ca917 (diff) | |
download | rockbox-a9c1df40014ebe548ab111fd28d854f22e231b5f.tar.gz rockbox-a9c1df40014ebe548ab111fd28d854f22e231b5f.zip |
* its name[rows][columns] you drongo!
* make custom viewer icons work slightly better
* minor nit-picks to keep crop happy
* create a /.rockbox/themes/default_rockbox_icons.cfg to restore the default icons easily
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13183 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r-- | apps/gui/icon.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index b844b4bb5b..6e4cd59059 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -74,11 +74,11 @@ static const int default_height[NB_SCREENS] = { #define IMG_BUFSIZE (MAX_ICON_HEIGHT * MAX_ICON_WIDTH * \ Icon_Last_Themeable *LCD_DEPTH/8) -static unsigned char icon_buffer[IMG_BUFSIZE][NB_SCREENS]; +static unsigned char icon_buffer[NB_SCREENS][IMG_BUFSIZE]; static bool custom_icons_loaded[NB_SCREENS] = {false}; static struct bitmap user_iconset[NB_SCREENS]; -static unsigned char viewer_icon_buffer[IMG_BUFSIZE][NB_SCREENS]; +static unsigned char viewer_icon_buffer[NB_SCREENS][IMG_BUFSIZE]; static bool viewer_icons_loaded[NB_SCREENS] = {false}; static struct bitmap viewer_iconset[NB_SCREENS]; @@ -252,13 +252,15 @@ void icons_init(void) { snprintf(path, MAX_PATH, "%s/%s.bmp", ICON_DIR, global_settings.icon_file); - load_icons(path, Iconset_Mainscreen); + load_icons((global_settings.icon_file[0] == '-')?NULL:path, + Iconset_Mainscreen); } if (global_settings.viewers_icon_file[0]) { snprintf(path, MAX_PATH, "%s/%s.bmp", ICON_DIR, global_settings.viewers_icon_file); - load_icons(path, Iconset_Mainscreen_viewers); + load_icons((global_settings.viewers_icon_file[0] == '-')?NULL:path, + Iconset_Mainscreen_viewers); read_viewer_theme_file(); } else @@ -268,13 +270,15 @@ void icons_init(void) { snprintf(path, MAX_PATH, "%s/%s.bmp", ICON_DIR, global_settings.remote_icon_file); - load_icons(path, Iconset_Remotescreen); + load_icons((global_settings.remote_icon_file[0] == '-')?NULL:path, + Iconset_Remotescreen); } if (global_settings.remote_viewers_icon_file[0]) { snprintf(path, MAX_PATH, "%s/%s.bmp", ICON_DIR, global_settings.remote_viewers_icon_file); - load_icons(path, Iconset_Remotescreen_viewers); + load_icons((global_settings.remote_viewers_icon_file[0] == '-')?NULL:path, + Iconset_Remotescreen_viewers); } else load_icons(DEFAULT_REMOTE_VIEWER_BMP, Iconset_Remotescreen_viewers); |