Elizabeth Figura : d3dx9: Use the correct interfaces for some COM calls.
Module: wine Branch: master Commit: 43afea4e9952109b1956f1e10d53bfb978f7a193 URL: https://gitlab.winehq.org/wine/wine/-/commit/43afea4e9952109b1956f1e10d53bfb... Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri Jun 21 19:18:13 2024 -0500 d3dx9: Use the correct interfaces for some COM calls. --- dlls/d3dx9_36/effect.c | 2 +- dlls/d3dx9_36/render.c | 8 +++++--- dlls/d3dx9_36/texture.c | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index ea965ce789b..d84ad749f30 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -4164,7 +4164,7 @@ static BOOL param_on_lost_device(void *data, struct d3dx_parameter *param) cube_texture = *(IDirect3DCubeTexture9 **)param->data; if (!cube_texture) return FALSE; - IDirect3DTexture9_GetLevelDesc(cube_texture, 0, &surface_desc); + IDirect3DCubeTexture9_GetLevelDesc(cube_texture, 0, &surface_desc); if (surface_desc.Pool != D3DPOOL_DEFAULT) return FALSE; break; diff --git a/dlls/d3dx9_36/render.c b/dlls/d3dx9_36/render.c index 6bef9430f80..31a2a2e3aff 100644 --- a/dlls/d3dx9_36/render.c +++ b/dlls/d3dx9_36/render.c @@ -503,7 +503,8 @@ static ULONG WINAPI D3DXRenderToEnvMap_Release(ID3DXRenderToEnvMap *iface) if (!ref) { - if (render->dst_cube_texture) IDirect3DSurface9_Release(render->dst_cube_texture); + if (render->dst_cube_texture) + IDirect3DCubeTexture9_Release(render->dst_cube_texture); if (render->render_target) IDirect3DSurface9_Release(render->render_target); if (render->depth_stencil) IDirect3DSurface9_Release(render->depth_stencil); @@ -585,7 +586,8 @@ static HRESULT WINAPI D3DXRenderToEnvMap_BeginCube(ID3DXRenderToEnvMap *iface, return D3D_OK; cleanup: - if (render->dst_cube_texture) IDirect3DSurface9_Release(render->dst_cube_texture); + if (render->dst_cube_texture) + IDirect3DCubeTexture9_Release(render->dst_cube_texture); render->dst_cube_texture = NULL; if (render->render_target) IDirect3DSurface9_Release(render->render_target); @@ -705,7 +707,7 @@ static HRESULT WINAPI D3DXRenderToEnvMap_End(ID3DXRenderToEnvMap *iface, render->depth_stencil = NULL; } - IDirect3DSurface9_Release(render->dst_cube_texture); + IDirect3DCubeTexture9_Release(render->dst_cube_texture); render->dst_cube_texture = NULL; render->state = INITIAL; diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 5a68b2dd1c4..8314146a264 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -84,7 +84,7 @@ HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture, else { numfaces = 6; - IDirect3DCubeTexture9_GetLevelDesc((IDirect3DTexture9*) texture, srclevel, &desc); + IDirect3DCubeTexture9_GetLevelDesc((IDirect3DCubeTexture9 *)texture, srclevel, &desc); } if (filter == D3DX_DEFAULT) @@ -1303,7 +1303,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f if (!texture || !function) return D3DERR_INVALIDCALL; - miplevels = IDirect3DBaseTexture9_GetLevelCount(texture); + miplevels = IDirect3DTexture9_GetLevelCount(texture); for (m = 0; m < miplevels; m++) { @@ -1652,7 +1652,7 @@ HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DX if (texture == NULL || function == NULL) return D3DERR_INVALIDCALL; - miplevels = IDirect3DBaseTexture9_GetLevelCount(texture); + miplevels = IDirect3DCubeTexture9_GetLevelCount(texture); for (m = 0; m < miplevels; m++) { @@ -1713,7 +1713,7 @@ HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LP if (texture == NULL || function == NULL) return D3DERR_INVALIDCALL; - miplevels = IDirect3DBaseTexture9_GetLevelCount(texture); + miplevels = IDirect3DVolumeTexture9_GetLevelCount(texture); for (m = 0; m < miplevels; m++) {
participants (1)
-
Alexandre Julliard