mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxgi] Make adapter code use new wsi interface
This commit is contained in:
parent
59b943cf12
commit
bc8e75fdfa
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user