mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-25 08:06:30 +00:00
[idd] driver: improve reInit logic on failure
This commit is contained in:
parent
f26fa17bc1
commit
75f07cb28c
@ -39,6 +39,7 @@ CIndirectMonitorContext::~CIndirectMonitorContext()
|
||||
|
||||
void CIndirectMonitorContext::AssignSwapChain(IDDCX_SWAPCHAIN swapChain, LUID renderAdapter, HANDLE newFrameEvent)
|
||||
{
|
||||
reInit:
|
||||
m_swapChain.reset();
|
||||
m_dx11Device = std::make_shared<CD3D11Device>(renderAdapter);
|
||||
if (FAILED(m_dx11Device->Init()))
|
||||
@ -59,9 +60,9 @@ void CIndirectMonitorContext::AssignSwapChain(IDDCX_SWAPCHAIN swapChain, LUID re
|
||||
return;
|
||||
|
||||
case CD3D12Device::RETRY:
|
||||
WdfObjectDelete(swapChain);
|
||||
m_devContext->ReplugMonitor();
|
||||
return;
|
||||
m_dx12Device.reset();
|
||||
m_dx11Device.reset();
|
||||
goto reInit;
|
||||
}
|
||||
|
||||
if (!m_devContext->SetupLGMP(alignSize))
|
||||
|
Loading…
x
Reference in New Issue
Block a user