mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 23:41:19 +01:00
e3a9ba30e3
Move to one display. There's no reason to have two displays here -- the comment stated that one should touch GLX and one should touch window events, and that they should be touched from different threads, but the current code wasn't this careful. Just use one Display connection.
44 lines
865 B
C++
44 lines
865 B
C++
// Copyright 2013 Dolphin Emulator Project
|
|
// Licensed under GPLv2
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include "Common/Thread.h"
|
|
|
|
#if USE_EGL
|
|
#include "DolphinWX/GLInterface/EGL.h"
|
|
#elif defined(__APPLE__)
|
|
#include "DolphinWX/GLInterface/AGL.h"
|
|
#elif defined(_WIN32)
|
|
#include "DolphinWX/GLInterface/WGL.h"
|
|
#elif HAVE_X11
|
|
#include "DolphinWX/GLInterface/GLX.h"
|
|
#include <GL/glx.h>
|
|
#else
|
|
#error Platform doesnt have a GLInterface
|
|
#endif
|
|
|
|
typedef struct {
|
|
#if USE_EGL
|
|
EGLSurface egl_surf;
|
|
EGLContext egl_ctx;
|
|
EGLDisplay egl_dpy;
|
|
EGLNativeWindowType native_window;
|
|
#elif defined(__APPLE__)
|
|
NSView *cocoaWin;
|
|
NSOpenGLContext *cocoaCtx;
|
|
#elif HAVE_X11
|
|
GLXContext ctx;
|
|
int screen;
|
|
Window win;
|
|
Window parent;
|
|
Display *dpy;
|
|
XVisualInfo *vi;
|
|
XSetWindowAttributes attr;
|
|
std::thread xEventThread;
|
|
#endif
|
|
} GLWindow;
|
|
|
|
extern GLWindow GLWin;
|