From 490e45d6cb382f11cc5920c71501f747c831c27b Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 1 Mar 2008 06:54:30 +0000 Subject: [PATCH] don't bother doing two-pass window setup unless vid_samples is greater than 1 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8169 d7cf8633-e32d-0410-b094-e92efae38249 --- vid_wgl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vid_wgl.c b/vid_wgl.c index 42557a90..1309c12c 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -1095,7 +1095,8 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat pixelformat = 0; newpixelformat = 0; - for (windowpass = 0;windowpass < 2;windowpass++) + // start out at the final windowpass if samples is 1 as it's the only feature we need extended pixel formats for + for (windowpass = samples == 1;windowpass < 2;windowpass++) { mainwindow = CreateWindowEx (ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL); if (!mainwindow) -- 2.39.2