diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-03 04:12:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-03 04:12:52 +0300 |
commit | 423385491fbfc0df9b01f6e7cb7af0d995154a6a (patch) | |
tree | 929298def20911ececa315dcf7fb707360066d37 /src/utils/glxhelper.cpp | |
parent | 694329376df2a2a491f1f665e4231a167ff11a3f (diff) | |
download | mv-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/glxhelper.cpp')
-rw-r--r-- | src/utils/glxhelper.cpp | 8 |
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); |