mirror of https://github.com/mpv-player/mpv
osdep/threads-win32: cast function type directly to avoid warnings
This commit is contained in:
parent
ab3d0b73f7
commit
c430420840
|
@ -188,12 +188,13 @@ static inline int mp_thread_detach(mp_thread thread)
|
|||
wchar_t *mp_from_utf8(void *talloc_ctx, const char *s);
|
||||
static inline void mp_thread_set_name(const char *name)
|
||||
{
|
||||
HRESULT (WINAPI *pSetThreadDescription)(HANDLE, PCWSTR);
|
||||
typedef HRESULT (WINAPI *SetThreadDescriptionFn)(HANDLE, PCWSTR);
|
||||
SetThreadDescriptionFn pSetThreadDescription;
|
||||
#if !HAVE_UWP
|
||||
HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
|
||||
if (!kernel32)
|
||||
return;
|
||||
pSetThreadDescription = (void *) GetProcAddress(kernel32, "SetThreadDescription");
|
||||
pSetThreadDescription = (SetThreadDescriptionFn) GetProcAddress(kernel32, "SetThreadDescription");
|
||||
if (!pSetThreadDescription)
|
||||
return;
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue