]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
don't bother doing two-pass window setup unless vid_samples is greater
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Mar 2008 06:54:30 +0000 (06:54 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Mar 2008 06:54:30 +0000 (06:54 +0000)
than 1

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8169 d7cf8633-e32d-0410-b094-e92efae38249

vid_wgl.c

index 42557a90a94de5010ee3d091024594c5326cd7e4..1309c12c3edb7f19233467f9e287dfd109f261cd 100644 (file)
--- 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)