]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a severe texture corruption and crash case when using vid_dx9 1 is used with...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 17 Apr 2013 02:46:57 +0000 (02:46 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 19 Apr 2013 09:39:30 +0000 (11:39 +0200)
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
gl_textures.c
snd_main.c

index 7d47664544f5b85e19e404f681b308ebd803de2b..2a7af7dd5e0b15ed2eed4d40a818631e9fce1e80 100644 (file)
@@ -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);
index 57c257f27d85d1ecfff4e5909a8e8a426d8c4ef9..2dd11ebf52f6d9ade26f4491a018dd0c8ba9dac5 100644 (file)
@@ -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:
index 7788a774a4138fb24e1cbbe8e8ae3d05b37b93fd..ab3ff1ac9b5c6f5e6775e3417212f8679751f016 100644 (file)
@@ -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;