rebrand and flip rortatoin

This commit is contained in:
2026-08-15 19:57:06 +02:00
parent b78069192b
commit 811d4f0ac9
7 changed files with 18 additions and 9 deletions

View File

@@ -101,8 +101,13 @@ Point mappedPoint() {
long mx = map((long)raw.x, calXmin, calXmax, MARGIN_PX, Config::SCREEN_WIDTH - MARGIN_PX);
long my = map((long)raw.y, calYmin, calYmax, MARGIN_PX, Config::SCREEN_HEIGHT - MARGIN_PX);
out.x = clampi((int16_t)mx, 0, Config::SCREEN_WIDTH - 1);
out.x = clampi((int16_t)mx, 0, Config::SCREEN_WIDTH - 1);
out.y = clampi((int16_t)my, 0, Config::SCREEN_HEIGHT - 1);
if (Config::DISPLAY_ROTATION == 2) {
out.x = Config::SCREEN_WIDTH - 1 - out.x;
out.y = Config::SCREEN_HEIGHT - 1 - out.y;
}
return out;
}