summaryrefslogtreecommitdiff
path: root/apps/gui/icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r--apps/gui/icon.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index e78aa6841c..2c09f88852 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -32,6 +32,7 @@
32#include "bmp.h" 32#include "bmp.h"
33#include "filetypes.h" 33#include "filetypes.h"
34#include "language.h" 34#include "language.h"
35#include "misc.h"
35 36
36#include "bitmaps/default_icons.h" 37#include "bitmaps/default_icons.h"
37#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) 38#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
@@ -181,10 +182,7 @@ static void load_icons(const char* filename, enum Iconset iconset,
181 ic->handle = 0; 182 ic->handle = 0;
182 if (filename[0] && filename[0] != '-') 183 if (filename[0] && filename[0] != '-')
183 { 184 {
184 char path[MAX_PATH]; 185 fd = open_pathfmt(O_RDONLY, ICON_DIR "/%s.bmp", filename);
185
186 snprintf(path, sizeof(path), ICON_DIR "/%s.bmp", filename);
187 fd = open(path, O_RDONLY);
188 if (fd < 0) 186 if (fd < 0)
189 return; 187 return;
190 buf_size = read_bmp_fd(fd, &ic->bmp, 0, 188 buf_size = read_bmp_fd(fd, &ic->bmp, 0,