From 447d7bde226ef15aa83d4e209c6c894c8ea614ed Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Wed, 26 May 2021 23:44:34 +0200 Subject: [PATCH] Fix screenshot function on color lcd Resolves #93 --- radio/src/gui/screenshot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/screenshot.cpp b/radio/src/gui/screenshot.cpp index 1cd5d00c4..bda30650a 100644 --- a/radio/src/gui/screenshot.cpp +++ b/radio/src/gui/screenshot.cpp @@ -80,7 +80,8 @@ const char * writeScreenshot() #if defined(COLORLCD) for (int y = LCD_H - 1; y >= 0; y--) { for (int x = 0; x < LCD_W; x++) { - auto pixel = *lcd->getPixelPtr(x, y); + lcdFront->reset(); + auto pixel = *(lcdFront->getPixelPtr(x, y)); uint32_t dst = (0xFF << 24) + (GET_RED(pixel) << 16) + (GET_GREEN(pixel) << 8) + (GET_BLUE(pixel) << 0); if (f_write(&bmpFile, &dst, sizeof(dst), &written) != FR_OK || written != sizeof(dst)) { f_close(&bmpFile);