diff options
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r-- | apps/gui/icon.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 5684ff057c..a9075b1b0f 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c | |||
@@ -44,19 +44,11 @@ | |||
44 | /* We dont actually do anything with these pointers, | 44 | /* We dont actually do anything with these pointers, |
45 | but they need to be grouped like this to save code | 45 | but they need to be grouped like this to save code |
46 | so storing them as void* is ok. (stops compile warning) */ | 46 | so storing them as void* is ok. (stops compile warning) */ |
47 | static const struct bitmap inbuilt_iconset[NB_SCREENS] = | 47 | static const struct bitmap *inbuilt_iconset[NB_SCREENS] = |
48 | { | 48 | { |
49 | { | 49 | &bm_default_icons, |
50 | .width = BMPWIDTH_default_icons, | ||
51 | .height = BMPHEIGHT_default_icons, | ||
52 | .data = (unsigned char*)default_icons, | ||
53 | }, | ||
54 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) | 50 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) |
55 | { | 51 | &bm_remote_default_icons, |
56 | .width = BMPWIDTH_remote_default_icons, | ||
57 | .height = BMPHEIGHT_remote_default_icons, | ||
58 | .data = (unsigned char*)remote_default_icons, | ||
59 | }, | ||
60 | #endif | 52 | #endif |
61 | }; | 53 | }; |
62 | 54 | ||
@@ -74,11 +66,11 @@ struct iconset { | |||
74 | } iconsets[Iconset_Count][NB_SCREENS]; | 66 | } iconsets[Iconset_Count][NB_SCREENS]; |
75 | 67 | ||
76 | #define ICON_HEIGHT(screen) (!iconsets[Iconset_user][screen].loaded ? \ | 68 | #define ICON_HEIGHT(screen) (!iconsets[Iconset_user][screen].loaded ? \ |
77 | inbuilt_iconset[screen] : iconsets[Iconset_user][screen].bmp).height \ | 69 | (*(inbuilt_iconset[screen])) : iconsets[Iconset_user][screen].bmp).height \ |
78 | / Icon_Last_Themeable | 70 | / Icon_Last_Themeable |
79 | 71 | ||
80 | #define ICON_WIDTH(screen) (!iconsets[Iconset_user][screen].loaded ? \ | 72 | #define ICON_WIDTH(screen) (!iconsets[Iconset_user][screen].loaded ? \ |
81 | inbuilt_iconset[screen] : iconsets[Iconset_user][screen].bmp).width | 73 | (*(inbuilt_iconset[screen])) : iconsets[Iconset_user][screen].bmp).width |
82 | 74 | ||
83 | /* x,y in letters, not pixles */ | 75 | /* x,y in letters, not pixles */ |
84 | void screen_put_icon(struct screen * display, | 76 | void screen_put_icon(struct screen * display, |
@@ -140,7 +132,7 @@ void screen_put_iconxy(struct screen * display, | |||
140 | } | 132 | } |
141 | else | 133 | else |
142 | { | 134 | { |
143 | iconset = &inbuilt_iconset[screen]; | 135 | iconset = inbuilt_iconset[screen]; |
144 | } | 136 | } |
145 | /* add some left padding to the icons if they are on the edge */ | 137 | /* add some left padding to the icons if they are on the edge */ |
146 | if (xpos == 0) | 138 | if (xpos == 0) |