Fix affinity for EmuCreateDeviceProxy thread

This commit is contained in:
Silent 2020-10-28 17:47:34 +01:00
parent 5fe769b906
commit 16efb84eb9
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 3 additions and 4 deletions

View File

@ -1605,12 +1605,11 @@ void EmuD3DInit()
{
// create the create device proxy thread
{
DWORD dwThreadId;
CreateThread(nullptr, 0, EmuCreateDeviceProxy, nullptr, 0, &dwThreadId);
HANDLE thread = CreateThread(nullptr, 0, EmuCreateDeviceProxy, nullptr, 0, nullptr);
// Ported from Dxbx :
// If possible, assign this thread to another core than the one that runs Xbox1 code :
SetThreadAffinityMask(&dwThreadId, g_CPUOthers);
SetThreadAffinityMask(thread, g_CPUOthers);
CloseHandle(thread);
}
// Initialise CreateDevice Proxy Data struct