Partial fixes from upstream #1607

This commit is contained in:
jpirnay
2026-04-09 13:54:56 +02:00
parent b3076303c7
commit 817187a415
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -30,14 +30,14 @@ struct DirectPixelWriter {
void init(GfxRenderer& renderer) {
fb = renderer.getFrameBuffer();
mode = renderer.getRenderMode();
displayWidthBytes = display.getDisplayWidthBytes();
displayWidthBytes = renderer.getDisplayWidthBytes();
const int phyW = display.getDisplayWidth();
const int phyH = display.getDisplayHeight();
const int phyW = renderer.getDisplayWidth();
const int phyH = renderer.getDisplayHeight();
switch (renderer.getOrientation()) {
case GfxRenderer::Portrait:
// phyX = y, phyY = (DISPLAY_HEIGHT-1) - x
// phyX = y, phyY = (phyH-1) - x
phyXBase = 0;
phyYBase = phyH - 1;
phyXStepX = 0;
@@ -46,7 +46,7 @@ struct DirectPixelWriter {
phyYStepY = 0;
break;
case GfxRenderer::LandscapeClockwise:
// phyX = (DISPLAY_WIDTH-1) - x, phyY = (DISPLAY_HEIGHT-1) - y
// phyX = (phyW-1) - x, phyY = (phyH-1) - y
phyXBase = phyW - 1;
phyYBase = phyH - 1;
phyXStepX = -1;
@@ -55,7 +55,7 @@ struct DirectPixelWriter {
phyYStepY = -1;
break;
case GfxRenderer::PortraitInverted:
// phyX = (DISPLAY_WIDTH-1) - y, phyY = x
// phyX = (phyW-1) - y, phyY = x
phyXBase = phyW - 1;
phyYBase = 0;
phyXStepX = 0;