summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
diff options
context:
space:
mode:
authorflacs <tilkax@gmail.com>2015-09-17 19:21:16 +0200
committerflacs <tilkax@gmail.com>2015-09-17 19:21:16 +0200
commite4dfb2f6bf7ca16c575a5723951c5f90868f76d1 (patch)
treefff4f534bf8f72b590c2e316921c0e7d61ff1f93 /Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
parentedae1d3bcb4383abd344757c4eab13d975a5e153 (diff)
parent48279c18402c04923a683e4a0488f8ad419b9b9a (diff)
Merge pull request #3054 from degasus/master
GLInterface: Fix VideoSW on linux + OSX
Diffstat (limited to 'Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp b/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
index cd8cc5f070..2d22ab7101 100644
--- a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
+++ b/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
@@ -44,7 +44,7 @@ void cInterfaceGLX::Swap()
// Create rendering window.
// Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
-bool cInterfaceGLX::Create(void *window_handle)
+bool cInterfaceGLX::Create(void *window_handle, bool core)
{
dpy = XOpenDisplay(nullptr);
int screen = DefaultScreen(dpy);
@@ -107,9 +107,13 @@ bool cInterfaceGLX::Create(void *window_handle)
GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
None
};
- ctx = glXCreateContextAttribs(dpy, fbconfig, 0, True, context_attribs);
- XSync(dpy, False);
- if (!ctx || s_glxError)
+ ctx = nullptr;
+ if (core)
+ {
+ ctx = glXCreateContextAttribs(dpy, fbconfig, 0, True, context_attribs);
+ XSync(dpy, False);
+ }
+ if (core && (!ctx || s_glxError))
{
int context_attribs_33[] =
{