- avoid checking for vr_enable_quadbuffered directly.

This option only exists on Windows, so on the other platforms it should not be in the menu and not affect the setup of the VR mode.
This commit is contained in:
Christoph Oelckers 2018-05-18 00:12:45 +02:00
parent 3f56e02352
commit b197bfc964
4 changed files with 7 additions and 2 deletions

View file

@ -88,7 +88,7 @@ const Stereo3DMode& Stereo3DMode::getCurrentMode()
setCurrentMode(RightEyeView::getInstance(vr_ipd)); setCurrentMode(RightEyeView::getInstance(vr_ipd));
break; break;
case 7: case 7:
if (vr_enable_quadbuffered) { if (screen->enable_quadbuffered) {
setCurrentMode(QuadStereo::getInstance(vr_ipd)); setCurrentMode(QuadStereo::getInstance(vr_ipd));
} }
else { else {

View file

@ -349,6 +349,7 @@ protected:
public: public:
int hwcaps = 0; int hwcaps = 0;
int instack[2] = { 0,0 }; // this is globally maintained state for portal recursion avoidance. int instack[2] = { 0,0 }; // this is globally maintained state for portal recursion avoidance.
bool enable_quadbuffered = false;
IntRect mScreenViewport; IntRect mScreenViewport;
IntRect mSceneViewport; IntRect mSceneViewport;

View file

@ -81,6 +81,7 @@ 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)

View file

@ -2235,7 +2235,10 @@ OptionMenu "OpenGLOptions" protected
Slider "$GLPREFMNU_MENUBLUR", gl_menu_blur, 0, 5.0, 0.5, 2 Slider "$GLPREFMNU_MENUBLUR", gl_menu_blur, 0, 5.0, 0.5, 2
StaticText " " StaticText " "
Option "$GLPREFMNU_VRMODE", vr_mode, "VRMode" Option "$GLPREFMNU_VRMODE", vr_mode, "VRMode"
IfOption(Windows)
{
Option "$GLPREFMNU_VRQUADSTEREO", vr_enable_quadbuffered, "OnOff" Option "$GLPREFMNU_VRQUADSTEREO", vr_enable_quadbuffered, "OnOff"
}
StaticText " " StaticText " "
Option "$GLPREFMNU_MULTISAMPLE", gl_multisample, "Multisample" Option "$GLPREFMNU_MULTISAMPLE", gl_multisample, "Multisample"
Option "$GLPREFMNU_TONEMAP", gl_tonemap, "TonemapModes" Option "$GLPREFMNU_TONEMAP", gl_tonemap, "TonemapModes"