Throw warnings instead of ceasing execution when creating vertex buffers fail.

This commit is contained in:
Luke Usher 2016-09-26 20:31:32 +01:00
parent 04548ad4b6
commit a45e8c6439
1 changed files with 3 additions and 12 deletions

View File

@ -4550,21 +4550,12 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
if(FAILED(hRet)) if(FAILED(hRet))
{ {
// TODO: Hack for Crazy Taxi 3?
char szString[256]; char szString[256];
sprintf( szString, "CreateVertexBuffer Failed!\n\nVB Size = 0x%X\n\nError: \nDesc: ", dwSize/*, sprintf( szString, "CreateVertexBuffer Failed!\n\nVB Size = 0x%X\n\nError: \nDesc: ", dwSize/*,
DXGetErrorString8A(hRet)*//*, DXGetErrorDescription8A(hRet)*/); DXGetErrorString8A(hRet)*//*, DXGetErrorDescription8A(hRet)*/);
if( dwSize != 0 ) EmuWarning( szString );
CxbxKrnlCleanup( szString ); return hRet;
else
{
EmuWarning( szString );
return hRet;
}
} }
#ifdef _DEBUG_TRACK_VB #ifdef _DEBUG_TRACK_VB
@ -6163,7 +6154,7 @@ XTL::X_D3DVertexBuffer* WINAPI XTL::EmuIDirect3DDevice8_CreateVertexBuffer2
); );
if(FAILED(hRet)) if(FAILED(hRet))
CxbxKrnlCleanup("CreateVertexBuffer Failed!"); EmuWarning("CreateVertexBuffer Failed!");
#ifdef _DEBUG_TRACK_VB #ifdef _DEBUG_TRACK_VB
g_VBTrackTotal.insert(pD3DVertexBuffer->EmuVertexBuffer8); g_VBTrackTotal.insert(pD3DVertexBuffer->EmuVertexBuffer8);