From e919e986052d4589deef1665ecfddd68c7efc096 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 14 Mar 2017 13:50:33 +0100 Subject: [PATCH] - fixed: When vr_quadbuffering is on and context creation fails, first retry without it before falling back on the compatibility handler. --- src/win32/win32gliface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/win32/win32gliface.cpp b/src/win32/win32gliface.cpp index 48de9e8e0..01845e845 100644 --- a/src/win32/win32gliface.cpp +++ b/src/win32/win32gliface.cpp @@ -712,6 +712,7 @@ bool Win32GLVideo::SetupPixelFormat(int multisample) if (myWglChoosePixelFormatARB) { + again: attributes[0] = WGL_RED_BITS_ARB; //bits attributes[1] = 8; attributes[2] = WGL_GREEN_BITS_ARB; //bits @@ -767,6 +768,12 @@ bool Win32GLVideo::SetupPixelFormat(int multisample) if (numFormats == 0) { + if (vr_enable_quadbuffered) + { + Printf("R_OPENGL: No valid pixel formats found for VR quadbuffering. Retrying without this feature\n"); + vr_enable_quadbuffered = false; + goto again; + } Printf("R_OPENGL: No valid pixel formats found. Retrying in compatibility mode\n"); goto oldmethod; }