diff options
Diffstat (limited to 'video/out/opengl/context.c')
-rw-r--r-- | video/out/opengl/context.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c index 325dc86f0f..59a7eda31c 100644 --- a/video/out/opengl/context.c +++ b/video/out/opengl/context.c @@ -34,12 +34,6 @@ enum { FLUSH_AUTO, }; -enum { - GLES_AUTO = 0, - GLES_YES, - GLES_NO, -}; - struct opengl_opts { int use_glfinish; int waitvsync; @@ -93,23 +87,17 @@ struct priv { int num_vsync_fences; }; -bool ra_gl_ctx_test_version(struct ra_ctx *ctx, int version, bool es) +enum gles_mode ra_gl_ctx_get_glesmode(struct ra_ctx *ctx) { - bool ret; - struct opengl_opts *opts; void *tmp = talloc_new(NULL); - opts = mp_get_config_group(tmp, ctx->global, &opengl_conf); + struct opengl_opts *opts; + enum gles_mode mode; - switch (opts->gles_mode) { - case GLES_YES: ret = es; goto done; - case GLES_NO: ret = !es; goto done; - case GLES_AUTO: ret = true; goto done; - default: abort(); - } + opts = mp_get_config_group(tmp, ctx->global, &opengl_conf); + mode = opts->gles_mode; -done: talloc_free(tmp); - return ret; + return mode; } void ra_gl_ctx_uninit(struct ra_ctx *ctx) |