diff options
-rw-r--r-- | apps/gui/usb_screen.c | 6 | ||||
-rw-r--r-- | firmware/font.c | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index 309f1a9fe6..6500413ed7 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c | |||
@@ -274,10 +274,6 @@ void gui_usb_screen_run(void) | |||
274 | #endif | 274 | #endif |
275 | } | 275 | } |
276 | 276 | ||
277 | #ifdef HAVE_LCD_BITMAP | ||
278 | for (i = FONT_UI; i < MAXFONTS; i++) font_unload(i); | ||
279 | #endif | ||
280 | |||
281 | while (1) | 277 | while (1) |
282 | { | 278 | { |
283 | usb_screens_draw(usb_screen_vps_ar); | 279 | usb_screens_draw(usb_screen_vps_ar); |
@@ -317,8 +313,6 @@ void gui_usb_screen_run(void) | |||
317 | 313 | ||
318 | #ifdef HAVE_LCD_CHARCELLS | 314 | #ifdef HAVE_LCD_CHARCELLS |
319 | status_set_usb(false); | 315 | status_set_usb(false); |
320 | #else | ||
321 | settings_apply(true); | ||
322 | #endif /* HAVE_LCD_CHARCELLS */ | 316 | #endif /* HAVE_LCD_CHARCELLS */ |
323 | 317 | ||
324 | FOR_NB_SCREENS(i) | 318 | FOR_NB_SCREENS(i) |
diff --git a/firmware/font.c b/firmware/font.c index c5348d54ff..f1584713ed 100644 --- a/firmware/font.c +++ b/firmware/font.c | |||
@@ -449,14 +449,11 @@ int font_load(struct font* pf, const char *path) | |||
449 | void font_unload(int font_id) | 449 | void font_unload(int font_id) |
450 | { | 450 | { |
451 | struct font* pf = sysfonts[font_id]; | 451 | struct font* pf = sysfonts[font_id]; |
452 | if (font_id && pf) | 452 | if (font_id >= SYSTEMFONTCOUNT && pf) |
453 | { | 453 | { |
454 | if (pf->fd >= 0) | 454 | if (pf->fd >= 0) |
455 | close(pf->fd); | 455 | close(pf->fd); |
456 | if (font_id == FONT_UI) | 456 | sysfonts[font_id] = NULL; |
457 | font_reset(pf); | ||
458 | else if (font_id >= SYSTEMFONTCOUNT) | ||
459 | sysfonts[font_id] = NULL; | ||
460 | } | 457 | } |
461 | } | 458 | } |
462 | 459 | ||