ZeroGS: Explicitly convert the LPVOID buffer to a const char*

Also make the failure case for one of these log calls a DEBUG_LOG instead
of a printf.
This commit is contained in:
Lioncash 2014-07-14 17:37:38 -04:00
parent f85a4c0467
commit b9ff3b6c81
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ static HRESULT LoadShaderFromType(const char* srcfile, int type, int texfilter,
if( FAILED(hr) )
{
printf("Failed to load %s\n%s\n", str, pError->GetBufferPointer());
DEBUG_LOG("Failed to load %s\n%s\n", str, reinterpret_cast<const char*>(pError->GetBufferPointer()));
SAFE_RELEASE(pShader);
SAFE_RELEASE(pError);
return hr;

View File

@ -1428,7 +1428,7 @@ public:
V(D3DXCompileShaderFromFile(EFFECT_NAME"ps2hw.fx", pmacros, pInclude, name, shaderver, ShaderFlagsVS, &pShader, &pError, NULL)); \
if( FAILED(hr) ) \
{ \
DEBUG_LOG("Failed to load vs %s: \n%s\n", name, pError->GetBufferPointer()); \
DEBUG_LOG("Failed to load vs %s: \n%s\n", name, reinterpret_cast<const char*>(pError->GetBufferPointer())); \
SAFE_RELEASE(pShader); \
SAFE_RELEASE(pError); \
return hr; \
@ -1444,7 +1444,7 @@ public:
V(D3DXCompileShaderFromFile(EFFECT_NAME"ps2hw.fx", pmacros, pInclude, name, shmodel, ShaderFlagsPS, &pShader, &pError, NULL)); \
if( FAILED(hr) ) \
{ \
DEBUG_LOG("Failed to load ps %s: \n%s\n", name, pError->GetBufferPointer()); \
DEBUG_LOG("Failed to load ps %s: \n%s\n", name, reinterpret_cast<const char*>(pError->GetBufferPointer())); \
SAFE_RELEASE(pShader); \
SAFE_RELEASE(pError); \
return hr; \