diff options
author | sfan5 <sfan5@live.de> | 2018-01-02 21:14:24 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-02 15:04:31 -0800 |
commit | 48943a73f68b09da9ff7120ca2804cf74f1cc27d (patch) | |
tree | 3a1a09780a2944344fc380fd532e44f55f87e1b7 /video | |
parent | 08bcf1d92da0ef19499c064cb8bc1b0cb64e5f10 (diff) | |
download | mpv-48943a73f68b09da9ff7120ca2804cf74f1cc27d.tar.bz2 mpv-48943a73f68b09da9ff7120ca2804cf74f1cc27d.tar.xz |
vo_gpu/context_android: replace both options with android-surface-size
This allows us to automatically trigger a VOCTRL_RESIZE (also contained).
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/context_android.c | 7 |
1 files changed, 3 insertions, 4 deletions
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); |