[dxgi] Make adapter code use new wsi interface

This commit is contained in:
Joshua Ashton 2022-08-14 17:08:27 +00:00 committed by Philip Rebohle
parent 59b943cf12
commit bc8e75fdfa
1 changed files with 5 additions and 9 deletions

View File

@ -12,6 +12,8 @@
#include "../util/util_luid.h"
#include "../wsi/wsi_monitor.h"
namespace dxvk {
DxgiVkAdapter::DxgiVkAdapter(DxgiAdapter* pAdapter)
@ -143,18 +145,12 @@ namespace dxvk {
if (ppOutput == nullptr)
return E_INVALIDARG;
MonitorEnumInfo info;
info.iMonitorId = Output;
info.oMonitor = nullptr;
HMONITOR monitor = wsi::enumMonitors(Output);
::EnumDisplayMonitors(
nullptr, nullptr, &MonitorEnumProc,
reinterpret_cast<LPARAM>(&info));
if (info.oMonitor == nullptr)
if (monitor == nullptr)
return DXGI_ERROR_NOT_FOUND;
*ppOutput = ref(new DxgiOutput(m_factory, this, info.oMonitor));
*ppOutput = ref(new DxgiOutput(m_factory, this, monitor));
return S_OK;
}