summaryrefslogtreecommitdiff
path: root/src/utils/glxhelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/glxhelper.cpp')
-rw-r--r--src/utils/glxhelper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils/glxhelper.cpp b/src/utils/glxhelper.cpp
index 2adfaf70b..75887a078 100644
--- a/src/utils/glxhelper.cpp
+++ b/src/utils/glxhelper.cpp
@@ -87,6 +87,7 @@ void *GlxHelper::createContext(const unsigned long window,
XSetErrorHandler(handler);
return nullptr;
}
+ logger->log("Found %d frame buffer contexts.", fbcount);
int attribs[] =
{
@@ -115,6 +116,13 @@ void *GlxHelper::createContext(const unsigned long window,
return nullptr;
}
+ if (mglXGetCurrentContext() != context2)
+ {
+ mglXDestroyContext(display, context2);
+ logger->log("context cant be changed to %d.%d.", major, minor);
+ return nullptr;
+ }
+
// do not delete SDL context, because on exit it will crash
// mglXDestroyContext(display, context);
logger->log("Context for %d.%d created", major, minor);