Skip to content

Commit

Permalink
[WINESYNC] d3d9: Avoid implicit cast of interface pointer.
Browse files Browse the repository at this point in the history
wine-staging patch by Sebastian Lackner <[email protected]>
  • Loading branch information
winesync authored and DarkFire01 committed Sep 12, 2023
1 parent db9e40c commit 5431a8b
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/dll/directx/wine/d3d9/texture.c b/dll/directx/wine/d3d9/texture.c
index ae754b5..5c30e4c 100644
--- a/dll/directx/wine/d3d9/texture.c
+++ b/dll/directx/wine/d3d9/texture.c
@@ -24,17 +24,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);

static inline struct d3d9_texture *impl_from_IDirect3DTexture9(IDirect3DTexture9 *iface)
{
- return CONTAINING_RECORD(iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
+ return CONTAINING_RECORD((IDirect3DBaseTexture9 *)iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
}

static inline struct d3d9_texture *impl_from_IDirect3DCubeTexture9(IDirect3DCubeTexture9 *iface)
{
- return CONTAINING_RECORD(iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
+ return CONTAINING_RECORD((IDirect3DBaseTexture9 *)iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
}

static inline struct d3d9_texture *impl_from_IDirect3DVolumeTexture9(IDirect3DVolumeTexture9 *iface)
{
- return CONTAINING_RECORD(iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
+ return CONTAINING_RECORD((IDirect3DBaseTexture9 *)iface, struct d3d9_texture, IDirect3DBaseTexture9_iface);
}

static void STDMETHODCALLTYPE srv_wined3d_object_destroyed(void *parent)

0 comments on commit 5431a8b

Please sign in to comment.