summaryrefslogtreecommitdiff
path: root/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2017-03-28 17:19:35 +1300
committerGitHub <noreply@github.com>2017-03-28 17:19:35 +1300
commit85d74a506f6e4024ae1ffdf857d68ebed96fa4a9 (patch)
tree615c4104ef8ab87cdc6267b9f856140eab025aa8 /Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
parent8c23888968cbc8b513c5b45df5014213ba356bc1 (diff)
parent0831dad467374f11256b5e63ca66b9dff5bf2463 (diff)
Merge pull request #4951 from waddlesplash/haiku-2
Initial support for Haiku.
Diffstat (limited to 'Source/Core/Common/GL/GLInterface/EGLHaiku.cpp')
-rw-r--r--Source/Core/Common/GL/GLInterface/EGLHaiku.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp b/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
new file mode 100644
index 0000000000..253b9c8c98
--- /dev/null
+++ b/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
@@ -0,0 +1,30 @@
+// Copyright 2017 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "Common/GL/GLInterface/EGLHaiku.h"
+
+#include <Window.h>
+
+EGLDisplay cInterfaceEGLHaiku::OpenDisplay()
+{
+ return eglGetDisplay(EGL_DEFAULT_DISPLAY);
+}
+
+EGLNativeWindowType cInterfaceEGLHaiku::InitializePlatform(EGLNativeWindowType host_window,
+ EGLConfig config)
+{
+ EGLint format;
+ eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format);
+
+ BWindow* window = reinterpret_cast<BWindow*>(host_window);
+ const int width = window->Size().width;
+ const int height = window->Size().height;
+ GLInterface->SetBackBufferDimensions(width, height);
+
+ return host_window;
+}
+
+void cInterfaceEGLHaiku::ShutdownPlatform()
+{
+}