Merge pull request #6951 from chinhodado/patch-5

Use E_FAIL instead of -1 and clean up
This commit is contained in:
Unknown W. Brackets 2014-09-26 21:19:37 -07:00
commit 265094f614

View File

@ -63,7 +63,7 @@ bool CompilePixelShader(const char *code, LPDIRECT3DPIXELSHADER9 *pShader, LPD3D
ID3DXBuffer* pShaderCode = NULL;
ID3DXBuffer* pErrorMsg = NULL;
HRESULT hr = -1;
HRESULT hr = E_FAIL;
// Compile pixel shader.
hr = dyn_D3DXCompileShader(code,
@ -103,7 +103,7 @@ bool CompileVertexShader(const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, LPD
ID3DXBuffer* pShaderCode = NULL;
ID3DXBuffer* pErrorMsg = NULL;
HRESULT hr = -1;
HRESULT hr = E_FAIL;
// Compile pixel shader.
hr = dyn_D3DXCompileShader(code,
@ -141,7 +141,6 @@ bool CompileVertexShader(const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, LPD
void CompileShaders() {
std::string errorMsg;
HRESULT hr = -1;
if (!CompileVertexShader(vscode, &pFramebufferVertexShader, NULL, errorMsg)) {
OutputDebugStringA(errorMsg.c_str());