- fixed crash with texture upscaling in the software renderer.

This commit is contained in:
Christoph Oelckers 2020-06-06 09:24:12 +02:00
parent 9bf0f9bbfc
commit 4746d0c626
1 changed files with 2 additions and 3 deletions

View File

@ -130,9 +130,8 @@ const uint8_t *FSoftwareTexture::GetPixels(int style)
} }
else else
{ {
auto f = mBufferFlags; auto f = mBufferFlags | CTF_Upscale;
if (shouldUpscale(mTexture, scaleFlagFromUseType(mTexture->GetUseType()))) f |= CTF_Upscale; auto tempbuffer = mSource->CreateTexBuffer(0, f);
auto tempbuffer = mSource->CreateTexBuffer(0, mBufferFlags);
Pixels.Resize(GetPhysicalWidth()*GetPhysicalHeight()); Pixels.Resize(GetPhysicalWidth()*GetPhysicalHeight());
PalEntry *pe = (PalEntry*)tempbuffer.mBuffer; PalEntry *pe = (PalEntry*)tempbuffer.mBuffer;
if (!style) if (!style)