From 697403b841cdb759f360f76097f91edfd7424811 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Sun, 22 Apr 2018 09:42:54 +0200 Subject: [PATCH] fixed PIXEL_PTR() macro on X10 fixes #5764 --- radio/src/gui/480x272/lcd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/480x272/lcd.h b/radio/src/gui/480x272/lcd.h index 8d834db80..b5dd216aa 100644 --- a/radio/src/gui/480x272/lcd.h +++ b/radio/src/gui/480x272/lcd.h @@ -164,7 +164,11 @@ void putsChnLetter(coord_t x, coord_t y, uint8_t idx, LcdFlags attr); #define DOTTED 0x55 #define STASHED 0x33 -#define PIXEL_PTR(x, y) &displayBuf[(y)*LCD_W + (x)] +#if defined(PCBX10) && !defined(SIMU) + #define PIXEL_PTR(x, y) &displayBuf[(LCD_H*LCD_W-1) - (y)*LCD_W - (x)] +#else + #define PIXEL_PTR(x, y) &displayBuf[(y)*LCD_W + (x)] +#endif void lcdDrawAlphaPixel(display_t * p, uint8_t opacity, uint16_t color); void lcdDrawPoint(coord_t x, coord_t y, LcdFlags att=0); -- 2.11.4.GIT