Commit f99c2c04 authored by Martin Schultz's avatar Martin Schultz

added option to query the first requested glStereo option

parent 34567dc0
......@@ -151,6 +151,8 @@ static bool samplesOverride_ = false;
/// Store the opengl stereo support
static bool glStereo_ = true;
static bool overrideGLStereo_ = false;
static bool requestedGLStereo = false;
static bool GLStereoSet = false;
/// Stereo mode
static StereoMode stereoMode_ = OpenGL;
......@@ -455,6 +457,11 @@ int samples() {
/// Store opengl stereo mode setting
void glStereo( bool _glStereo, bool _temporary ) {
if(!GLStereoSet) // store the first set value because it is used to create the context
{ // so we can display it properly later on in options
requestedGLStereo = _glStereo;
GLStereoSet = true;
}
if(_temporary)
{
glStereo_ = _glStereo;
......@@ -472,6 +479,11 @@ bool glStereo( ) {
return OpenFlipperSettings().value("Core/OpenGL/Stereo",false).toBool();
}
/// get the glStereo flag that was used to request the opengl context
bool glStereoRequested( ) {
return requestedGLStereo;
}
/// Store stereo mode setting
void stereoMode( StereoMode _mode ) {
stereoMode_ = _mode;
......
......@@ -461,6 +461,10 @@ QString helpDirStr();
/// will be set in core is opengl stereo is supported
DLLEXPORT
bool glStereo( );
/// will be set in core is opengl stereo is supported
DLLEXPORT
bool glStereoRequested( );
/// Store stereo mode setting
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