summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2015-09-17 17:48:25 +0200
committerdegasus <wickmarkus@web.de>2015-09-17 17:52:56 +0200
commit48279c18402c04923a683e4a0488f8ad419b9b9a (patch)
tree5352acc5a81d7da0ff6fb91c72feb972148c25c7 /Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp
parent52de4cc476429d77240434c4c0c6fcaff353f39a (diff)
GLInterface: Fix VideoSW on linux + OSX
Our Video Software backend isn't OpenGL Core compatible, so we need a flag to alloc a compatible one.
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[] =
{