diff options
| author | Augustin Cavalier <waddlesplash@gmail.com> | 2017-02-22 12:21:10 -0500 |
|---|---|---|
| committer | Augustin Cavalier <waddlesplash@gmail.com> | 2017-03-27 23:46:19 -0400 |
| commit | 0831dad467374f11256b5e63ca66b9dff5bf2463 (patch) | |
| tree | 4c4db3771b5fa0c9da6221f84a1057334d042bb3 /Source/Core/Common/GL/GLInterface/EGLHaiku.cpp | |
| parent | 7304cb0f8eb55169f7f601444a1733020fd96e15 (diff) | |
Initial support for Haiku.
Diffstat (limited to 'Source/Core/Common/GL/GLInterface/EGLHaiku.cpp')
| -rw-r--r-- | Source/Core/Common/GL/GLInterface/EGLHaiku.cpp | 30 |
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() +{ +} |
