don't allow stencil without bitsperpixel 32
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 7 Nov 2002 20:38:57 +0000 (20:38 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 7 Nov 2002 20:38:57 +0000 (20:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2605 d7cf8633-e32d-0410-b094-e92efae38249

vid_shared.c

index 2743742..6cf000a 100644 (file)
@@ -541,6 +541,12 @@ void VID_Open(void)
                        Cvar_SetValueQuick(&vid_stencil, 1);
        }
 
+       if (vid_stencil.integer && vid_bitsperpixel.integer != 32)
+       {
+               Con_Printf("vid_stencil not allowed without vid_bitsperpixel 32, turning off vid_stencil\n");
+               Cvar_SetValueQuick(&vid_stencil, 0);
+       }
+
        Con_Printf("Starting video system\n");
        if (!VID_Mode(vid_fullscreen.integer, vid_width.integer, vid_height.integer, vid_bitsperpixel.integer, vid_stencil.integer))
        {