From d7112b5dd7e33ad1eda4acaf5d208f719decb16f Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sat, 2 Jan 2016 20:44:38 +0100 Subject: [PATCH] BMP also works (1bit bitmaps are not supported by stb-image library) --- radio/src/bmp.cpp | 1 + radio/src/gui/horus/menu_general_sdmanager.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/radio/src/bmp.cpp b/radio/src/bmp.cpp index c05115e62..eca7ec015 100644 --- a/radio/src/bmp.cpp +++ b/radio/src/bmp.cpp @@ -427,6 +427,7 @@ const char *writeScreenshot() #define STB_IMAGE_IMPLEMENTATION #define STBI_ONLY_PNG #define STBI_ONLY_JPEG +#define STBI_ONLY_BMP #include "thirdparty/Stb/stb_image.h" diff --git a/radio/src/gui/horus/menu_general_sdmanager.cpp b/radio/src/gui/horus/menu_general_sdmanager.cpp index 72cb5a8ab..810940a93 100644 --- a/radio/src/gui/horus/menu_general_sdmanager.cpp +++ b/radio/src/gui/horus/menu_general_sdmanager.cpp @@ -360,7 +360,7 @@ bool menuGeneralSdManager(evt_t _event) if (ext && !strcasecmp(ext, BITMAPS_EXT)) { if (lastBitmap != menuVerticalPosition) { lastBitmap = menuVerticalPosition; - if (bmpLoad(modelBitmap, reusableBuffer.sdmanager.lines[index], MODEL_BITMAP_WIDTH, MODEL_BITMAP_HEIGHT)) { + if (imgLoad(modelBitmap, reusableBuffer.sdmanager.lines[index], MODEL_BITMAP_WIDTH, MODEL_BITMAP_HEIGHT)) { ((uint32_t *)modelBitmap)[0] = 0; } }