diff --git a/gfx/common/d3d_common.c b/gfx/common/d3d_common.c index 1d91dd4382..9f24d75011 100644 --- a/gfx/common/d3d_common.c +++ b/gfx/common/d3d_common.c @@ -255,10 +255,12 @@ bool d3d_vertex_declaration_new(LPDIRECT3DDEVICE dev, #if defined(__cplusplus) if (SUCCEEDED(dev->CreateVertexDeclaration(vertex_elements, (IDirect3DVertexDeclaration9**)vertex_decl))) + return true; #else if (SUCCEEDED(IDirect3DDevice9_CreateVertexDeclaration(dev, vertex_elements, (IDirect3DVertexDeclaration9**)vertex_decl))) -#endif return true; +#endif + #endif return false; }