From 2b616c0682a894152b06ef7249b32ef17037b3e5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 11 May 2017 17:41:54 +0200 Subject: vo_opengl: drop TLS usage TLS is a headache. We should avoid it if we can. The involved mechanism is unfortunately entangled with the unfortunate libmpv API for returning pointers to host API objects. This has to be kept until we change the API somehow. Practically untested out of pure laziness. I'm sure I'll get a bunch of reports if it's broken. --- video/out/opengl/common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'video/out/opengl/common.c') diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c index 271214954a..fc0ec547db 100644 --- a/video/out/opengl/common.c +++ b/video/out/opengl/common.c @@ -610,3 +610,13 @@ void mpgl_load_functions(GL *gl, void *(*getProcAddress)(const GLubyte *), { mpgl_load_functions2(gl, get_procaddr_wrapper, getProcAddress, ext2, log); } + +void *mpgl_get_native_display(struct GL *gl, const char *name) +{ + void *res = NULL; + if (gl->get_native_display) + res = gl->get_native_display(gl->get_native_display_ctx, name); + if (!res && gl->MPGetNativeDisplay) + res = gl->MPGetNativeDisplay(name); + return res; +} -- cgit v1.2.3