D3D : Don't crash hard when SetStreamSource fails (this gets Galleon in-game again)
This commit is contained in:
parent
70af9c5684
commit
e8e6fc56fb
|
@ -4239,9 +4239,9 @@ VOID XTL::DxbxUpdateActivePixelShader() // NOPATCH
|
|||
|
||||
HRESULT Result = D3D_OK;
|
||||
|
||||
// TODO: Is this even right? he first RenderState is PSAlpha,
|
||||
// TODO: Is this even right? The first RenderState is PSAlpha,
|
||||
// The pixel shader is stored in pDevice->m_pPixelShader
|
||||
// For now, we still patch SetPixleShader and read from there...
|
||||
// For now, we still patch SetPixelShader and read from there...
|
||||
//DWORD *XTL_D3D__RenderState = XTL::EmuMappedD3DRenderState[0];
|
||||
//pPSDef = (XTL::X_D3DPIXELSHADERDEF*)(XTL_D3D__RenderState);
|
||||
pPSDef = g_D3DActivePixelShader != nullptr ? g_D3DActivePixelShader->pPSDef : nullptr;
|
||||
|
|
|
@ -350,7 +350,7 @@ void XTL::CxbxVertexBufferConverter::ConvertStream
|
|||
HRESULT hRet = g_pD3DDevice->SetStreamSource(uiStream, nullptr, 0);
|
||||
// DEBUG_D3DRESULT(hRet, "g_pD3DDevice->SetStreamSource");
|
||||
if (FAILED(hRet)) {
|
||||
CxbxKrnlCleanup("g_pD3DDevice->SetStreamSource(uiStream, nullptr, 0)\n");
|
||||
EmuWarning("g_pD3DDevice->SetStreamSource(uiStream, nullptr, 0)");
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -407,7 +407,7 @@ void XTL::CxbxVertexBufferConverter::ConvertStream
|
|||
((SHORT *)pHostVertexAsFloat)[0] = ((SHORT*)pXboxVertex)[0];
|
||||
((SHORT *)pHostVertexAsFloat)[1] = ((SHORT*)pXboxVertex)[1];
|
||||
((SHORT *)pHostVertexAsFloat)[2] = ((SHORT*)pXboxVertex)[2];
|
||||
((SHORT *)pHostVertexAsFloat)[3] = 0x01;
|
||||
((SHORT *)pHostVertexAsFloat)[3] = 0x01; // Turok verified (character disappears when this is 32767)
|
||||
pXboxVertex += 3 * sizeof(SHORT);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue