summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2015-06-10 00:00:12 +0200
committerJules Blok <jules.blok@gmail.com>2015-06-10 00:00:12 +0200
commit7dfced21a2e5aac7195e0e1ad76468e30306766b (patch)
treebd671b639d3d911460b767caabad8fc8a759a6bf /Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp
parentc25be031fc1031d795157d8344b87b7841145197 (diff)
parent7b0a65e295c784f9d573f2ef52d4e2a7b9bb2889 (diff)
Merge branch 'master' into stable
Diffstat (limited to 'Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp b/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp
new file mode 100644
index 0000000000..46ceaa9371
--- /dev/null
+++ b/Source/Core/VideoBackends/OGL/GLInterface/EGLAndroid.cpp
@@ -0,0 +1,29 @@
+// Copyright 2014 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "Core/Host.h"
+#include "VideoBackends/OGL/GLInterface/EGLAndroid.h"
+
+EGLDisplay cInterfaceEGLAndroid::OpenDisplay()
+{
+ return eglGetDisplay(EGL_DEFAULT_DISPLAY);
+}
+
+EGLNativeWindowType cInterfaceEGLAndroid::InitializePlatform(EGLNativeWindowType host_window, EGLConfig config)
+{
+ EGLint format;
+ eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format);
+ ANativeWindow_setBuffersGeometry(host_window, 0, 0, format);
+
+ const int width = ANativeWindow_getWidth(host_window);
+ const int height = ANativeWindow_getHeight(host_window);
+ GLInterface->SetBackBufferDimensions(width, height);
+
+ return host_window;
+}
+
+void cInterfaceEGLAndroid::ShutdownPlatform()
+{
+}
+