mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-06-19 05:04:28 +00:00
[host] d12: handle IDXGIAdapter::EnumOutputs errors
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Before, the code treated any errors other than DXGI_ERROR_NOT_FOUND as if they were successes, which is incorrect.
This commit is contained in:
@@ -987,11 +987,17 @@ static bool d12_enumerateDevices(
|
|||||||
DEBUG_INFO("Adapter matched, trying: %ls", adapterDesc.Description);
|
DEBUG_INFO("Adapter matched, trying: %ls", adapterDesc.Description);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(
|
for (int n = 0; ; ++n, comRef_release(output))
|
||||||
int n = 0;
|
|
||||||
IDXGIAdapter1_EnumOutputs(*adapter, n, output) != DXGI_ERROR_NOT_FOUND;
|
|
||||||
++n, comRef_release(output))
|
|
||||||
{
|
{
|
||||||
|
HRESULT hr = IDXGIAdapter1_EnumOutputs(*adapter, n, output);
|
||||||
|
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
if (hr != DXGI_ERROR_NOT_FOUND)
|
||||||
|
DEBUG_WINERROR("Failed to IDXGIAdapter::EnumOutputs", hr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
IDXGIOutput_GetDesc(*output, &outputDesc);
|
IDXGIOutput_GetDesc(*output, &outputDesc);
|
||||||
|
|
||||||
if (optOutput)
|
if (optOutput)
|
||||||
|
|||||||
Reference in New Issue
Block a user