diff options
author | wm4 <wm4@nowhere> | 2017-05-11 17:41:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-05-11 17:47:33 +0200 |
commit | 2b616c0682a894152b06ef7249b32ef17037b3e5 (patch) | |
tree | d2714deb7052e11b32437d66c348fa2b2ac6562e /video/out/opengl/hwdec_dxva2gldx.c | |
parent | f2961425e770defe7cedc14ee2d4c9d4a53ab203 (diff) | |
download | mpv-2b616c0682a894152b06ef7249b32ef17037b3e5.tar.bz2 mpv-2b616c0682a894152b06ef7249b32ef17037b3e5.tar.xz |
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.
Diffstat (limited to 'video/out/opengl/hwdec_dxva2gldx.c')
-rw-r--r-- | video/out/opengl/hwdec_dxva2gldx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/opengl/hwdec_dxva2gldx.c b/video/out/opengl/hwdec_dxva2gldx.c index c0bca283bb..eb44f2b38b 100644 --- a/video/out/opengl/hwdec_dxva2gldx.c +++ b/video/out/opengl/hwdec_dxva2gldx.c @@ -82,7 +82,7 @@ static void destroy(struct gl_hwdec *hw) static int create(struct gl_hwdec *hw) { GL *gl = hw->gl; - if (!gl->MPGetNativeDisplay || !(gl->mpgl_caps & MPGL_CAP_DXINTEROP)) + if (!(gl->mpgl_caps & MPGL_CAP_DXINTEROP)) return -1; struct priv *p = talloc_zero(hw, struct priv); @@ -90,12 +90,12 @@ static int create(struct gl_hwdec *hw) // AMD drivers won't open multiple dxinterop HANDLES on the same D3D device, // so we request the one already in use by context_dxinterop - p->device_h = gl->MPGetNativeDisplay("dxinterop_device_HANDLE"); + p->device_h = mpgl_get_native_display(gl, "dxinterop_device_HANDLE"); if (!p->device_h) return -1; // But we also still need the actual D3D device - p->device = gl->MPGetNativeDisplay("IDirect3DDevice9Ex"); + p->device = mpgl_get_native_display(gl, "IDirect3DDevice9Ex"); if (!p->device) return -1; IDirect3DDevice9Ex_AddRef(p->device); |