[dxgi] Fix behavior of GetWindowAssociation

This commit is contained in:
Etaash Mathamsetty 2023-08-08 23:19:30 -04:00 committed by Philip Rebohle
parent dfcd7aedd8
commit 429555a540
2 changed files with 3 additions and 5 deletions

View File

@ -407,7 +407,8 @@ namespace dxvk {
if (pWindowHandle == nullptr) if (pWindowHandle == nullptr)
return DXGI_ERROR_INVALID_CALL; return DXGI_ERROR_INVALID_CALL;
*pWindowHandle = m_associatedWindow; // Wine tests show that this is always null for whatever reason
*pWindowHandle = nullptr;
return S_OK; return S_OK;
} }
@ -422,7 +423,6 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) { HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) {
Logger::warn("DXGI: MakeWindowAssociation: Ignoring flags"); Logger::warn("DXGI: MakeWindowAssociation: Ignoring flags");
m_associatedWindow = WindowHandle;
return S_OK; return S_OK;
} }

View File

@ -182,9 +182,7 @@ namespace dxvk {
DxgiMonitorInfo m_monitorInfo; DxgiMonitorInfo m_monitorInfo;
UINT m_flags; UINT m_flags;
BOOL m_monitorFallback; BOOL m_monitorFallback;
HWND m_associatedWindow = nullptr;
}; };
} }