Fix an issue where AutoDepthStencilFormat of D16_LOCKABLE caused CreateDevice to fail

This commit is contained in:
Luke Usher 2018-05-03 23:17:44 +01:00
parent 4cc918881d
commit 564826e38d
1 changed files with 5 additions and 0 deletions

View File

@ -2001,6 +2001,11 @@ static DWORD WINAPI EmuCreateDeviceProxy(LPVOID)
g_EmuCDPD.BehaviorFlags |= D3DCREATE_MULTITHREADED;
#endif
// For some reason, D3DFMT_D16_LOCKABLE as the AudoDepthStencil causes CreateDevice to fail...
if (g_EmuCDPD.HostPresentationParameters.AutoDepthStencilFormat == XTL::D3DFMT_D16_LOCKABLE) {
g_EmuCDPD.HostPresentationParameters.AutoDepthStencilFormat = XTL::D3DFMT_D16;
}
// redirect to windows Direct3D
g_EmuCDPD.hRet = g_pDirect3D->CreateDevice(
g_EmuCDPD.Adapter,