libobs-d3d11: Use vendor ID instead of string match

master
Richard Stanway 2019-10-14 23:06:33 +02:00
parent 6b08c064f6
commit 323638e704
1 changed files with 2 additions and 6 deletions

View File

@ -431,10 +431,6 @@ static bool set_priority(ID3D11Device *device)
return true;
}
static bool is_intel(const wstring &name)
{
return wstrstri(name.c_str(), L"intel") != nullptr;
}
#endif
void gs_device::InitDevice(uint32_t adapterIdx)
@ -471,9 +467,9 @@ void gs_device::InitDevice(uint32_t adapterIdx)
blog(LOG_INFO, "D3D11 loaded successfully, feature level used: %x",
(unsigned int)levelUsed);
/* adjust gpu thread priority */
/* adjust gpu thread priority on non-intel GPUs*/
#if USE_GPU_PRIORITY
if (!is_intel(adapterName) && !set_priority(device)) {
if (desc.VendorId != 0x8086 && !set_priority(device)) {
blog(LOG_INFO, "D3D11 GPU priority setup "
"failed (not admin?)");
}