Skip to content

Commit 265094f

Browse files
Merge pull request hrydgard#6951 from chinhodado/patch-5
Use E_FAIL instead of -1 and clean up
2 parents 7442e57 + 7b4b0eb commit 265094f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: GPU/Directx9/helper/global.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool CompilePixelShader(const char *code, LPDIRECT3DPIXELSHADER9 *pShader, LPD3D
6363
ID3DXBuffer* pShaderCode = NULL;
6464
ID3DXBuffer* pErrorMsg = NULL;
6565

66-
HRESULT hr = -1;
66+
HRESULT hr = E_FAIL;
6767

6868
// Compile pixel shader.
6969
hr = dyn_D3DXCompileShader(code,
@@ -103,7 +103,7 @@ bool CompileVertexShader(const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, LPD
103103
ID3DXBuffer* pShaderCode = NULL;
104104
ID3DXBuffer* pErrorMsg = NULL;
105105

106-
HRESULT hr = -1;
106+
HRESULT hr = E_FAIL;
107107

108108
// Compile pixel shader.
109109
hr = dyn_D3DXCompileShader(code,
@@ -141,7 +141,6 @@ bool CompileVertexShader(const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, LPD
141141

142142
void CompileShaders() {
143143
std::string errorMsg;
144-
HRESULT hr = -1;
145144

146145
if (!CompileVertexShader(vscode, &pFramebufferVertexShader, NULL, errorMsg)) {
147146
OutputDebugStringA(errorMsg.c_str());

0 commit comments

Comments
 (0)