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; ...@@ -150,6 +150,7 @@ static bool samplesOverride_ = false;
/// Store the opengl stereo support /// Store the opengl stereo support
static bool glStereo_ = true; static bool glStereo_ = true;
static bool overrideGLStereo_ = false;
/// Stereo mode /// Stereo mode
static StereoMode stereoMode_ = OpenGL; static StereoMode stereoMode_ = OpenGL;
...@@ -453,13 +454,22 @@ int samples() { ...@@ -453,13 +454,22 @@ int samples() {
} }
/// Store opengl stereo mode setting /// Store opengl stereo mode setting
void glStereo( bool _glStereo ) { void glStereo( bool _glStereo, bool _temporary ) {
glStereo_ = _glStereo; if(_temporary)
{
glStereo_ = _glStereo;
overrideGLStereo_ = true;
}
else
OpenFlipperSettings().setValue("Core/OpenGL/Stereo",_glStereo);
} }
/// get current opengl stereo setting /// get current opengl stereo setting
bool glStereo( ) { bool glStereo( ) {
return glStereo_; if(overrideGLStereo_)
return glStereo_;
else
return OpenFlipperSettings().value("Core/OpenGL/Stereo",false).toBool();
} }
/// Store stereo mode setting /// Store stereo mode setting
......
...@@ -456,7 +456,7 @@ QString helpDirStr(); ...@@ -456,7 +456,7 @@ QString helpDirStr();
/// Store opengl stereo support setting /// Store opengl stereo support setting
DLLEXPORT DLLEXPORT
void glStereo( bool _stereo ); void glStereo( bool _stereo, bool _temporary = false );
/// will be set in core is opengl stereo is supported /// will be set in core is opengl stereo is supported
DLLEXPORT 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