diff --git a/defines/d3d_defines.h b/defines/d3d_defines.h index 6f87b21867..2e98aabfee 100644 --- a/defines/d3d_defines.h +++ b/defines/d3d_defines.h @@ -21,6 +21,8 @@ /* Direct3D 9 */ #include +#define ID3DSURFACE IDirect3DSurface9 + #define LPDIRECT3D LPDIRECT3D9 #define LPDIRECT3DDEVICE LPDIRECT3DDEVICE9 #define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9 @@ -60,6 +62,7 @@ #define D3DVERTEXELEMENT D3DVERTEXELEMENT8 #define D3DVIEWPORT D3DVIEWPORT8 +#define ID3DSURFACE IDirect3DSurface8 #define D3DCREATE_CTX Direct3DCreate8 #if !defined(D3DLOCK_NOSYSLOCK) && defined(_XBOX) diff --git a/gfx/common/d3d_common.c b/gfx/common/d3d_common.c index baaf33cb3e..fd6e94ba62 100644 --- a/gfx/common/d3d_common.c +++ b/gfx/common/d3d_common.c @@ -74,7 +74,7 @@ bool d3d_texture_get_surface_level(LPDIRECT3DTEXTURE tex, if (SUCCEEDED(IDirect3DTexture8_GetSurfaceLevel(tex, idx, (LPDIRECT3DSURFACE**)_ppsurface_level))) return true; #else - if (SUCCEEDED(tex->GetSurfaceLevel(idx, (LPDIRECT3DSURFACE**)_ppsurface_level))) + if (SUCCEEDED(tex->GetSurfaceLevel(idx, (ID3DSURFACE**)_ppsurface_level))) return true; #endif return false;