mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-05-15 00:00:18 -05:00
mingw: fix thread affinity for ming
This commit is contained in:
parent
62a6a76bf4
commit
ee680f0191
|
|
@ -48,7 +48,8 @@ int CurrentThreadId()
|
|||
|
||||
void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask)
|
||||
{
|
||||
SetThreadAffinityMask(thread, mask);
|
||||
// Cast required for MINGW
|
||||
SetThreadAffinityMask(reinterpret_cast<HANDLE>(thread), mask);
|
||||
}
|
||||
|
||||
void SetCurrentThreadAffinity(u32 mask)
|
||||
|
|
@ -89,6 +90,7 @@ static void SetCurrentThreadNameViaException(const char* name)
|
|||
info.dwThreadID = static_cast<DWORD>(-1);
|
||||
info.dwFlags = 0;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
__try
|
||||
{
|
||||
RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*)&info);
|
||||
|
|
@ -96,6 +98,7 @@ static void SetCurrentThreadNameViaException(const char* name)
|
|||
__except (EXCEPTION_CONTINUE_EXECUTION)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void SetCurrentThreadNameViaApi(const char* name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user