From 8c0b0853e4d1d3a2e37480a63b9d086ffed32802 Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:57:34 -0600 Subject: [PATCH] Fix GT911 touch coordinate axes for T-Deck Plus display orientation Swap X/Y axes and invert Y so (0, 0) maps to the top-left corner, matching the physical display orientation on the T-Deck Plus. Patch suggested by scotty007 in PR #10. --- src/hal/TouchInput.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hal/TouchInput.cpp b/src/hal/TouchInput.cpp index 52fd561..f5dc065 100644 --- a/src/hal/TouchInput.cpp +++ b/src/hal/TouchInput.cpp @@ -79,10 +79,11 @@ bool TouchInput::readGT911() { } uint8_t trackId = Wire.read(); - _x = Wire.read() | (Wire.read() << 8); _y = Wire.read() | (Wire.read() << 8); + _x = Wire.read() | (Wire.read() << 8); Wire.read() | (Wire.read() << 8); // size (unused) + _y = TFT_HEIGHT - 1 - _y; _touched = true; // Clear buffer status