- Fixed tutti-frutti and crash with liquid warp effects on the Carmack renderer when texture resizing was disabled. (#1063)

This commit is contained in:
dondiego 2020-04-01 01:17:41 +02:00 committed by GitHub
parent cc0594df2e
commit 4bfb0e937f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,7 @@
EXTERN_CVAR(Int, gl_texture_hqresizemult)
EXTERN_CVAR(Int, gl_texture_hqresizemode)
EXTERN_CVAR(Int, gl_texture_hqresize_targets)
FWarpTexture::FWarpTexture (FTexture *source, int warptype)
: FSoftwareTexture (source)
@ -63,7 +64,7 @@ const uint32_t *FWarpTexture::GetPixelsBgra()
if (time != GenTime[2])
{
if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1)
if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1 || !(gl_texture_hqresize_targets & 1))
resizeMult = 1;
auto otherpix = FSoftwareTexture::GetPixelsBgra();
@ -84,7 +85,7 @@ const uint8_t *FWarpTexture::GetPixels(int index)
if (time != GenTime[index])
{
if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1)
if (gl_texture_hqresizemode == 0 || gl_texture_hqresizemult < 1 || !(gl_texture_hqresize_targets & 1))
resizeMult = 1;
const uint8_t *otherpix = FSoftwareTexture::GetPixels(index);