GS: Fix displays that are currently unplugged (disabled) from throwing unnecessary warnings

This commit is contained in:
Filoppi 2025-04-15 06:54:52 +03:00
parent 9c34ac27a2
commit cc441c1057
1 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ std::vector<GSAdapterInfo> D3D::GetAdapterInfo(IDXGIFactory5* factory)
ai.max_upscale_multiplier = GSGetMaxUpscaleMultiplier(ai.max_texture_size);
wil::com_ptr_nothrow<IDXGIOutput> output;
// Only check the first output, which would be the primary display (if any is connected)
if (SUCCEEDED(hr = adapter->EnumOutputs(0, &output)))
{
UINT num_modes = 0;
@ -111,7 +112,7 @@ std::vector<GSAdapterInfo> D3D::GetAdapterInfo(IDXGIFactory5* factory)
ERROR_LOG("GetDisplayModeList() failed: {:08X}", static_cast<unsigned>(hr));
}
}
else
else if (hr != DXGI_ERROR_NOT_FOUND)
{
ERROR_LOG("EnumOutputs() failed: {:08X}", static_cast<unsigned>(hr));
}