mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[host] dxgi: fixed reversed logic for fallback
This commit is contained in:
parent
037ea5b1fc
commit
263b412fdf
@ -332,21 +332,25 @@ bool DXGI::Initialize(CaptureOptions * options)
|
|||||||
IDXGIOutput1Ptr output1 = m_output;
|
IDXGIOutput1Ptr output1 = m_output;
|
||||||
if (!output1)
|
if (!output1)
|
||||||
{
|
{
|
||||||
// we try this twice in case we still get an error on re-initialization
|
DEBUG_ERROR("Failed to get IDXGIOutput1");
|
||||||
for (int i = 0; i < 2; ++i)
|
DeInitialize();
|
||||||
{
|
return false;
|
||||||
status = output1->DuplicateOutput(m_device, &m_dup);
|
}
|
||||||
if (SUCCEEDED(status))
|
|
||||||
break;
|
|
||||||
Sleep(200);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FAILED(status))
|
// we try this twice in case we still get an error on re-initialization
|
||||||
{
|
for (int i = 0; i < 2; ++i)
|
||||||
DEBUG_WINERROR("DuplicateOutput Failed", status);
|
{
|
||||||
DeInitialize();
|
status = output1->DuplicateOutput(m_device, &m_dup);
|
||||||
return false;
|
if (SUCCEEDED(status))
|
||||||
}
|
break;
|
||||||
|
Sleep(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(status))
|
||||||
|
{
|
||||||
|
DEBUG_WINERROR("DuplicateOutput Failed", status);
|
||||||
|
DeInitialize();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user