From 4a16739bddbff2ecd629c8a131ddce9e96c93c3a Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 16 Apr 2007 12:26:49 +0000 Subject: Some gremlins got into my computer again and changed all my code! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13181 a1c6a512-1295-4272-9138-f99709370657 --- apps/filetypes.c | 27 ++++----------------------- apps/gui/icon.c | 6 +++--- 2 files changed, 7 insertions(+), 26 deletions(-) (limited to 'apps') diff --git a/apps/filetypes.c b/apps/filetypes.c index 407f3a00e2..25dc0fe7da 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -75,33 +75,12 @@ static char *filetypes_strdup(char* string) static void read_builtin_types(void); static void read_config(char* config_file); #ifdef HAVE_LCD_BITMAP - -static void reset_icons(void) -{ - int i, j, count; - const struct filetype *types; - tree_get_filetypes(&types, &count); - for (i=1; i= '0' && *icon <= '9') + filetypes[i].icon = Icon_Last_Themeable + atoi(icon); break; } } @@ -234,7 +214,8 @@ static void read_config(char* config_file) filetypes[filetype_count].icon = atoi(s+1); else if (*s == '-') filetypes[filetype_count].icon = Icon_NOICON; - else filetypes[filetype_count].icon = Icon_Last_Themeable + atoi(s); + else if (*s >= '0' && *s <= '9') + filetypes[filetype_count].icon = Icon_Last_Themeable + atoi(s); #else filetypes[filetype_count].icon = Icon_NOICON; #endif diff --git a/apps/gui/icon.c b/apps/gui/icon.c index b283ec2c80..647c15434e 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -134,8 +134,8 @@ void screen_put_iconxy(struct screen * display, else if (icon >= Icon_Last_Themeable) { icon -= Icon_Last_Themeable; - if (!viewer_icons_loaded[screen] || - (icon*ICON_HEIGHT(screen) > viewer_iconset[screen].height)) + if (!viewer_icons_loaded[screen]/* || + (icon*ICON_HEIGHT(screen) > viewer_iconset[screen].height)*/) { screen_clear_area(display, xpos, ypos, ICON_WIDTH(screen), ICON_HEIGHT(screen)); @@ -270,7 +270,7 @@ void icons_init(void) load_icons(path, Iconset_Remotescreen_viewers); } else - load_icons(DEFAULT_REMOTE_VIEWER_BMP, Iconset_Mainscreen_viewers); + load_icons(DEFAULT_REMOTE_VIEWER_BMP, Iconset_Remotescreen_viewers); #endif } -- cgit v1.2.3