From 0831dad467374f11256b5e63ca66b9dff5bf2463 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 22 Feb 2017 12:21:10 -0500 Subject: Initial support for Haiku. --- Source/Core/Common/GL/GLInterface/EGLHaiku.cpp | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Source/Core/Common/GL/GLInterface/EGLHaiku.cpp (limited to 'Source/Core/Common/GL/GLInterface/EGLHaiku.cpp') 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 + +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(host_window); + const int width = window->Size().width; + const int height = window->Size().height; + GLInterface->SetBackBufferDimensions(width, height); + + return host_window; +} + +void cInterfaceEGLHaiku::ShutdownPlatform() +{ +} -- cgit v1.2.3