1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[d3d9] Remove incorrect error returns SetDialogBoxMode

The Microsoft docs for this are incorrect based on my tests of all the described edge-cases.
https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-setdialogboxmode
This commit is contained in:
Joshua Ashton 2020-01-04 21:09:58 +00:00
parent ae01bd8bd4
commit d53b3adaea

View File

@ -402,18 +402,10 @@ namespace dxvk {
HRESULT D3D9SwapChainEx::SetDialogBoxMode(bool bEnableDialogs) {
if (bEnableDialogs) {
if (m_presentParams.BackBufferFormat != D3DFMT_X1R5G5B5 &&
m_presentParams.BackBufferFormat != D3DFMT_R5G6B5 &&
m_presentParams.BackBufferFormat != D3DFMT_X8R8G8B8)
return D3DERR_INVALIDCALL;
if (m_presentParams.SwapEffect == D3DSWAPEFFECT_DISCARD)
return D3DERR_INVALIDCALL;
if (m_presentParams.Flags & D3DPRESENTFLAG_LOCKABLE_BACKBUFFER)
return D3DERR_INVALIDCALL;
}
// https://docs.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-setdialogboxmode
// The MSDN documentation says this will error out under many weird conditions.
// However it doesn't appear to error at all in any of my tests of these
// cases described in the documentation.
m_dialogChanged = m_dialog != bEnableDialogs;
m_dialog = bEnableDialogs;