From 5977ab5be1ba93d1560d601b2e7fb4646a180bb8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 16 Oct 2012 14:31:18 +0200 Subject: [PATCH] (Android) Implement gfx_ctx_get_video_size --- gfx/context/androidegl_ctx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index da167f9028..4c4cbc87ed 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -271,6 +271,16 @@ static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) { (void)width; (void)height; + + if (g_egl_dpy) + { + EGLint gl_width; + EGLint gl_height; + eglQuerySurface(g_egl_dpy, g_egl_surf, EGL_WIDTH, &gl_width); + eglQuerySurface(g_egl_dpy, g_egl_surf, EGL_HEIGHT, &gl_height); + *width = gl_width; + *height = gl_height; + } }