- 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

View file

@ -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)