diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index 593aaee86..ab659addd 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -16,7 +16,6 @@ namespace dxvk { const Rc& adapter) : m_factory (factory), m_adapter (adapter) { - SetupOutputs(); SetupFormatTable(); } @@ -65,10 +64,14 @@ namespace dxvk { if (ppOutput == nullptr) return DXGI_ERROR_INVALID_CALL; - if (Output > 0) + if (Output > 0) { + *ppOutput = nullptr; return DXGI_ERROR_NOT_FOUND; + } - *ppOutput = m_output.ref(); + // TODO support multiple monitors + HMONITOR monitor = ::MonitorFromPoint({ 0, 0 }, MONITOR_DEFAULTTOPRIMARY); + *ppOutput = ref(new DxgiOutput(this, monitor)); return S_OK; } @@ -274,13 +277,6 @@ namespace dxvk { } - void DxgiAdapter::SetupOutputs() { - // TODO support multiple monitors - HMONITOR monitor = ::MonitorFromPoint({ 0, 0 }, MONITOR_DEFAULTTOPRIMARY); - m_output = new DxgiOutput(this, monitor); - } - - void DxgiAdapter::SetupFormatTable() { /***********************************************************************************/ /* C O L O R F O R M A T S */ diff --git a/src/dxgi/dxgi_adapter.h b/src/dxgi/dxgi_adapter.h index e8d0aafd6..76f4ecaaa 100644 --- a/src/dxgi/dxgi_adapter.h +++ b/src/dxgi/dxgi_adapter.h @@ -66,7 +66,6 @@ namespace dxvk { using FormatMap = std::unordered_map; Com m_factory; - Com m_output; Rc m_adapter; FormatMap m_colorFormats; @@ -92,8 +91,6 @@ namespace dxvk { VkFormat dstFormat, VkImageAspectFlags srvAspect); - void SetupOutputs(); - void SetupFormatTable(); };