From d7d9d925f4349b25f5c8353ad0a3a43a49ec8bed Mon Sep 17 00:00:00 2001 From: philmoz Date: Sun, 28 Apr 2024 14:59:21 +1000 Subject: [PATCH] fix(bw): screen shots saved on radios with OLED screens inverted (#4935) --- radio/src/gui/screenshot.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/radio/src/gui/screenshot.cpp b/radio/src/gui/screenshot.cpp index a82ac8a41..f1aed9270 100644 --- a/radio/src/gui/screenshot.cpp +++ b/radio/src/gui/screenshot.cpp @@ -117,6 +117,9 @@ const char * writeScreenshot() for (int y=LCD_H-1; y>=0; y-=1) { for (int x=0; x<8*((LCD_W+7)/8); x+=2) { pixel_t byte = getPixel(x+1, y) + (getPixel(x, y) << 4); +#if defined(OLED_SCREEN) + byte ^= 0xFF; +#endif if (f_write(&bmpFile, &byte, 1, &written) != FR_OK || written != 1) { f_close(&bmpFile); return SDCARD_ERROR(result);