From d3a88e9206954ca536b893c647ba177f27d6dfc0 Mon Sep 17 00:00:00 2001 From: JQ Date: Sun, 4 May 2025 21:54:47 -0700 Subject: [PATCH] T114 Landscape --- src/helpers/ui/ST7789Spi.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/helpers/ui/ST7789Spi.h b/src/helpers/ui/ST7789Spi.h index 93bfa87c..09af6457 100644 --- a/src/helpers/ui/ST7789Spi.h +++ b/src/helpers/ui/ST7789Spi.h @@ -366,9 +366,8 @@ class ST7789Spi : public OLEDDisplay { private: void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { - // For landscape orientation (240x135) - x += (320-displayWidth)/2; // Center horizontally in 320 pixels - y += (240-displayHeight)/2; // Center vertically in 240 pixels + x += (320-displayWidth)/2; + y += (240-displayHeight)/2; uint32_t xa = ((uint32_t)x << 16) | (x + w - 1); uint32_t ya = ((uint32_t)y << 16) | (y + h - 1);