From 4746d0c626d42e03df089ec0121557dc5fc4fa79 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 6 Jun 2020 09:24:12 +0200 Subject: [PATCH] - fixed crash with texture upscaling in the software renderer. --- src/rendering/swrenderer/textures/r_swtexture.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rendering/swrenderer/textures/r_swtexture.cpp b/src/rendering/swrenderer/textures/r_swtexture.cpp index baa4f1c71c..dbd218c3d4 100644 --- a/src/rendering/swrenderer/textures/r_swtexture.cpp +++ b/src/rendering/swrenderer/textures/r_swtexture.cpp @@ -130,9 +130,8 @@ const uint8_t *FSoftwareTexture::GetPixels(int style) } else { - auto f = mBufferFlags; - if (shouldUpscale(mTexture, scaleFlagFromUseType(mTexture->GetUseType()))) f |= CTF_Upscale; - auto tempbuffer = mSource->CreateTexBuffer(0, mBufferFlags); + auto f = mBufferFlags | CTF_Upscale; + auto tempbuffer = mSource->CreateTexBuffer(0, f); Pixels.Resize(GetPhysicalWidth()*GetPhysicalHeight()); PalEntry *pe = (PalEntry*)tempbuffer.mBuffer; if (!style)