From fd1cd2cf81a2d39a4e47e76485860a87f0bf33f6 Mon Sep 17 00:00:00 2001 From: Iliyas Jorio Date: Wed, 1 Feb 2023 19:56:13 +0100 Subject: [PATCH] DrawChar: Advance pen position even if offscreen --- src/Graphics/Graphics.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Graphics/Graphics.cpp b/src/Graphics/Graphics.cpp index 8e5db72..ba08784 100644 --- a/src/Graphics/Graphics.cpp +++ b/src/Graphics/Graphics.cpp @@ -655,6 +655,9 @@ void DrawChar(char c) dstRect.right = dstRect.left + SysFont::widthBits; dstRect.bottom = dstRect.top + SysFont::rows; + // Advance pen position + penX += glyph.width; + Rect clippedDstRect = dstRect; if (!IntersectRects(&curPort->port.portRect, &clippedDstRect)) { @@ -688,6 +691,4 @@ void DrawChar(char c) dst2 += curPort->pixels.width; } - - penX += glyph.width; }