From 921cc9a98c41518e4a7c1a4e15b2bb3c68a6d0fc Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 17 Apr 2013 02:46:57 +0000 Subject: [PATCH] fix a severe texture corruption and crash case when using vid_dx9 1 is used with vid_sRGB 1 work around a crash when using vid_dx9 1 with vid_stereobuffer 1 (this needs a better fix, D3D9 does not support this) fix a warning in C++ where a bit flag mask was being passed as a bool git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11942 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=a38c129ff5ec67a0fabc260b59d12922ebb497d8 --- cl_screen.c | 2 +- gl_textures.c | 2 +- snd_main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index 7d476645..2a7af7dd 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -2597,7 +2597,7 @@ void SCR_UpdateLoadingScreen (qboolean clear, qboolean startup) if (qglDrawBuffer) qglDrawBuffer(GL_BACK); SCR_DrawLoadingScreen_SharedSetup(clear); - if (vid.stereobuffer) + if (vid.stereobuffer && qglDrawBuffer) { qglDrawBuffer(GL_BACK_LEFT); SCR_DrawLoadingScreen(clear); diff --git a/gl_textures.c b/gl_textures.c index 57c257f2..2dd11ebf 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -1624,7 +1624,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden case TEXTYPE_SRGB_DXT1A: textype = TEXTYPE_DXT1A ;convertsRGB = true;break; case TEXTYPE_SRGB_DXT3: textype = TEXTYPE_DXT3 ;convertsRGB = true;break; case TEXTYPE_SRGB_DXT5: textype = TEXTYPE_DXT5 ;convertsRGB = true;break; - case TEXTYPE_SRGB_PALETTE: textype = TEXTYPE_PALETTE;convertsRGB = true;break; + case TEXTYPE_SRGB_PALETTE: textype = TEXTYPE_PALETTE;/*convertsRGB = true;*/break; case TEXTYPE_SRGB_RGBA: textype = TEXTYPE_RGBA ;convertsRGB = true;break; case TEXTYPE_SRGB_BGRA: textype = TEXTYPE_BGRA ;convertsRGB = true;break; default: diff --git a/snd_main.c b/snd_main.c index 7788a774..ab3ff1ac 100644 --- a/snd_main.c +++ b/snd_main.c @@ -1695,7 +1695,7 @@ int S_StartSound_StartPosition_Flags (int entnum, int entchannel, sfx_t *sfx, ve S_SetChannelSpeed(ch_idx, fspeed); for(i = 1; i > 0 && (i <= flags || i <= (int) channels[ch_idx].flags); i <<= 1) if((flags ^ channels[ch_idx].flags) & i) - S_SetChannelFlag(ch_idx, i, flags & i); + S_SetChannelFlag(ch_idx, i, (flags & i) != 0); ch->distfade = attenuation / snd_soundradius.value; SND_Spatialize(ch, false); return ch_idx; -- 2.39.2