mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +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 "../util/util_luid.h"
|
||||||
|
|
||||||
|
#include "../wsi/wsi_monitor.h"
|
||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
DxgiVkAdapter::DxgiVkAdapter(DxgiAdapter* pAdapter)
|
DxgiVkAdapter::DxgiVkAdapter(DxgiAdapter* pAdapter)
|
||||||
@ -143,18 +145,12 @@ namespace dxvk {
|
|||||||
if (ppOutput == nullptr)
|
if (ppOutput == nullptr)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
MonitorEnumInfo info;
|
HMONITOR monitor = wsi::enumMonitors(Output);
|
||||||
info.iMonitorId = Output;
|
|
||||||
info.oMonitor = nullptr;
|
|
||||||
|
|
||||||
::EnumDisplayMonitors(
|
if (monitor == nullptr)
|
||||||
nullptr, nullptr, &MonitorEnumProc,
|
|
||||||
reinterpret_cast<LPARAM>(&info));
|
|
||||||
|
|
||||||
if (info.oMonitor == nullptr)
|
|
||||||
return DXGI_ERROR_NOT_FOUND;
|
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;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user