- fixed vr_enable_quadbuffered for real

I did not consider that this is an init-only option. So changing the CVAR may not affect game behavior at all. Instead its value must be moved to some globally accessible variable on startup that never gets changed again.
This commit is contained in:
Christoph Oelckers 2018-05-18 08:44:32 +02:00
parent f2e6ca4ced
commit ebbe52082a
2 changed files with 1 additions and 3 deletions

View file

@ -33,8 +33,6 @@
#include "gl/stereo3d/gl_interleaved3d.h" #include "gl/stereo3d/gl_interleaved3d.h"
#include "version.h" #include "version.h"
EXTERN_CVAR(Bool, vr_enable_quadbuffered)
// Set up 3D-specific console variables: // Set up 3D-specific console variables:
CVAR(Int, vr_mode, 0, CVAR_GLOBALCONFIG) CVAR(Int, vr_mode, 0, CVAR_GLOBALCONFIG)

View file

@ -81,7 +81,6 @@ CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINI
CUSTOM_CVAR(Bool, vr_enable_quadbuffered, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) CUSTOM_CVAR(Bool, vr_enable_quadbuffered, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{ {
Printf("You must restart " GAMENAME " to switch quad stereo mode\n"); Printf("You must restart " GAMENAME " to switch quad stereo mode\n");
screen->enable_quadbuffered = self;
} }
EXTERN_CVAR(Int, vid_refreshrate) EXTERN_CVAR(Int, vid_refreshrate)
@ -1082,6 +1081,7 @@ SystemFrameBuffer::SystemFrameBuffer(void *hMonitor, int width, int height, int
m_supportsGamma = !!GetDeviceGammaRamp(hDC, (void *)m_origGamma); m_supportsGamma = !!GetDeviceGammaRamp(hDC, (void *)m_origGamma);
ReleaseDC(Window, hDC); ReleaseDC(Window, hDC);
enable_quadbuffered = vr_enable_quadbuffered;
} }
//========================================================================== //==========================================================================