Browse Source

T114 Landscape

pull/248/head
JQ 1 year ago
parent
commit
d3a88e9206
  1. 5
      src/helpers/ui/ST7789Spi.h

5
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);

Loading…
Cancel
Save