From 05c846c4eb770f38c56844a1b8c31142ac658b73 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 2 Jun 2022 08:32:39 +0200 Subject: [PATCH] - fixed: the last column of a text-type start screen was not rendered. --- src/common/startscreen/startscreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/startscreen/startscreen.cpp b/src/common/startscreen/startscreen.cpp index 03e6cddf1..84889bb6c 100644 --- a/src/common/startscreen/startscreen.cpp +++ b/src/common/startscreen/startscreen.cpp @@ -436,7 +436,7 @@ int FStartScreen::DrawChar(FBitmap& screen, double x, double y, unsigned charnum const uint8_t* src = GetHexChar(charnum); if (!src) src = space; int size = (*src++) == 32? 2 : 1; - if (x >= (screen.GetWidth() >> 3) - size) return size; + if (x > (screen.GetWidth() >> 3) - size) return size; int pitch = screen.GetWidth(); RgbQuad* dest = (RgbQuad*)screen.GetPixels() + int(x * 8) + int(y * 16) * pitch; @@ -668,7 +668,7 @@ void FStartScreen::Render(bool force) float displayheight; twod->Begin(screen->GetWidth(), screen->GetHeight()); - // Weird shit moment: Vulkan does not render the screen clear if there isn't something textured in the buffer before it. + // At this point the shader for untextured rendering has not been loaded yet, so we got to clear the screen by rendering a texture with black color. DrawTexture(twod, StartupTexture, 0, 0, DTA_VirtualWidthF, StartupTexture->GetDisplayWidth(), DTA_VirtualHeightF, StartupTexture->GetDisplayHeight(), DTA_KeepRatio, true, DTA_Color, PalEntry(255,0,0,0), TAG_END); if (HeaderTexture)