diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-10-21 04:55:41 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-11-05 17:36:17 +0000 |
commit | 174df99ffa53f1091589eaa4fa0c16cdd55a9326 (patch) | |
tree | 3a60d45615f18beed98a9b08267c28ed7e05dd5f /video/out/gpu/d3d11_helpers.c | |
parent | 3a8b107f6216b38a151d5ca1e9d4f2727e3418f5 (diff) | |
download | mpv-174df99ffa53f1091589eaa4fa0c16cdd55a9326.tar.bz2 mpv-174df99ffa53f1091589eaa4fa0c16cdd55a9326.tar.xz |
ALL: use new mp_thread abstraction
Diffstat (limited to 'video/out/gpu/d3d11_helpers.c')
-rw-r--r-- | video/out/gpu/d3d11_helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/gpu/d3d11_helpers.c b/video/out/gpu/d3d11_helpers.c index b3e524056e..30d9eae56f 100644 --- a/video/out/gpu/d3d11_helpers.c +++ b/video/out/gpu/d3d11_helpers.c @@ -19,12 +19,12 @@ #include <d3d11.h> #include <dxgi1_6.h> #include <versionhelpers.h> -#include <pthread.h> #include "common/common.h" #include "common/msg.h" #include "misc/bstr.h" #include "osdep/io.h" +#include "osdep/threads.h" #include "osdep/windows_utils.h" #include "d3d11_helpers.h" @@ -33,7 +33,7 @@ #define DXGI_ADAPTER_FLAG_SOFTWARE (2) typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); -static pthread_once_t d3d11_once = PTHREAD_ONCE_INIT; +static mp_once d3d11_once = MP_STATIC_ONCE_INITIALIZER; static PFN_D3D11_CREATE_DEVICE pD3D11CreateDevice = NULL; static PFN_CREATE_DXGI_FACTORY pCreateDXGIFactory1 = NULL; static void d3d11_load(void) @@ -51,7 +51,7 @@ static void d3d11_load(void) static bool load_d3d11_functions(struct mp_log *log) { - pthread_once(&d3d11_once, d3d11_load); + mp_exec_once(&d3d11_once, d3d11_load); if (!pD3D11CreateDevice || !pCreateDXGIFactory1) { mp_fatal(log, "Failed to load base d3d11 functionality: " "CreateDevice: %s, CreateDXGIFactory1: %s\n", |