Commit 2cb94c25 authored by Martin Schultz's avatar Martin Schultz

modified glStereo option to be overrideable similar to other OpenGL

options
parent 21b24403
......@@ -150,6 +150,7 @@ static bool samplesOverride_ = false;
/// Store the opengl stereo support
static bool glStereo_ = true;
static bool overrideGLStereo_ = false;
/// Stereo mode
static StereoMode stereoMode_ = OpenGL;
......@@ -453,13 +454,22 @@ int samples() {
}
/// Store opengl stereo mode setting
void glStereo( bool _glStereo ) {
glStereo_ = _glStereo;
void glStereo( bool _glStereo, bool _temporary ) {
if(_temporary)
{
glStereo_ = _glStereo;
overrideGLStereo_ = true;
}
else
OpenFlipperSettings().setValue("Core/OpenGL/Stereo",_glStereo);
}
/// get current opengl stereo setting
bool glStereo( ) {
return glStereo_;
if(overrideGLStereo_)
return glStereo_;
else
return OpenFlipperSettings().value("Core/OpenGL/Stereo",false).toBool();
}
/// Store stereo mode setting
......
......@@ -456,7 +456,7 @@ QString helpDirStr();
/// Store opengl stereo support setting
DLLEXPORT
void glStereo( bool _stereo );
void glStereo( bool _stereo, bool _temporary = false );
/// will be set in core is opengl stereo is supported
DLLEXPORT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment