mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-29 21:56:58 +00:00
Support a headless EGL option.
This is a new option to support completely headless running of Dolphin without X11 on systems that can properly support it.
This commit is contained in:
parent
184a7a3e0d
commit
628e9bad92
5 changed files with 26 additions and 10 deletions
|
@ -27,7 +27,7 @@ protected:
|
|||
EGLContext egl_ctx;
|
||||
EGLDisplay egl_dpy;
|
||||
|
||||
virtual EGLDisplay OpenDisplay() { return EGL_NO_DISPLAY; }
|
||||
virtual EGLDisplay OpenDisplay() { return eglGetDisplay(EGL_DEFAULT_DISPLAY); }
|
||||
virtual EGLNativeWindowType InitializePlatform(EGLNativeWindowType host_window, EGLConfig config) { return (EGLNativeWindowType)EGL_DEFAULT_DISPLAY; }
|
||||
virtual void ShutdownPlatform() {}
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#else
|
||||
#include "Common/GL/GLInterface/GLX.h"
|
||||
#endif
|
||||
#elif defined(USE_EGL) && USE_EGL && defined(USE_HEADLESS)
|
||||
#include "Common/GL/GLInterface/EGL.h"
|
||||
#else
|
||||
#error Platform doesnt have a GLInterface
|
||||
#endif
|
||||
|
@ -30,6 +32,8 @@ std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
|||
return std::make_unique<cInterfaceAGL>();
|
||||
#elif defined(_WIN32)
|
||||
return std::make_unique<cInterfaceWGL>();
|
||||
#elif defined(USE_EGL) && defined(USE_HEADLESS)
|
||||
return std::make_unique<cInterfaceEGL>();
|
||||
#elif defined(HAVE_X11) && HAVE_X11
|
||||
#if defined(USE_EGL) && USE_EGL
|
||||
return std::make_unique<cInterfaceEGLX11>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue