From 48943a73f68b09da9ff7120ca2804cf74f1cc27d Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 2 Jan 2018 21:14:24 +0100 Subject: vo_gpu/context_android: replace both options with android-surface-size This allows us to automatically trigger a VOCTRL_RESIZE (also contained). --- video/out/opengl/context_android.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'video') diff --git a/video/out/opengl/context_android.c b/video/out/opengl/context_android.c index ca41b7e8b8..d405e79fa0 100644 --- a/video/out/opengl/context_android.c +++ b/video/out/opengl/context_android.c @@ -27,14 +27,13 @@ #include "context.h" struct android_opts { - int w, h; + struct m_geometry surface_size; }; #define OPT_BASE_STRUCT struct android_opts const struct m_sub_options android_conf = { .opts = (const struct m_option[]) { - OPT_INT("android-surface-width", w, 0), - OPT_INT("android-surface-height", h, 0), + OPT_SIZE_BOX("android-surface-size", surface_size, UPDATE_VO_RESIZE), {0} }, .size = sizeof(struct android_opts), @@ -139,7 +138,7 @@ static bool android_reconfig(struct ra_ctx *ctx) struct priv *p = ctx->priv; void *tmp = talloc_new(NULL); struct android_opts *opts = mp_get_config_group(tmp, ctx->global, &android_conf); - int w = opts->w, h = opts->h; + int w = opts->surface_size.w, h = opts->surface_size.h; if (!w) eglQuerySurface(p->egl_display, p->egl_surface, EGL_WIDTH, &w); -- cgit v1.2.3