summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-03 04:12:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-03 04:12:52 +0300
commit423385491fbfc0df9b01f6e7cb7af0d995154a6a (patch)
tree929298def20911ececa315dcf7fb707360066d37 /src/utils
parent694329376df2a2a491f1f665e4231a167ff11a3f (diff)
downloadmv-423385491fbfc0df9b01f6e7cb7af0d995154a6a.tar.gz
mv-423385491fbfc0df9b01f6e7cb7af0d995154a6a.tar.bz2
mv-423385491fbfc0df9b01f6e7cb7af0d995154a6a.tar.xz
mv-423385491fbfc0df9b01f6e7cb7af0d995154a6a.zip
Add debug info in SDL 1.2 context creation code.
Diffstat (limited to 'src/utils')
-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);