From cafb444b9e7458bc652c7ad9036a19f3cd273b44 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 7 Nov 2002 20:38:57 +0000 Subject: [PATCH] don't allow stencil without bitsperpixel 32 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2605 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_shared.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vid_shared.c b/vid_shared.c index 2743742d..6cf000ac 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -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)) { -- 2.39.2