Sebastian Lackner : d3dx9: Adjust ID3DXEffect interface based on DLL version.
Alexandre Julliard
julliard at winehq.org
Wed Mar 14 17:37:18 CDT 2018
Module: wine
Branch: master
Commit: 1c8c9308e74abe5e5d85dfe722dea10e60092e7c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1c8c9308e74abe5e5d85dfe722dea10e60092e7c
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Tue Mar 13 22:56:10 2018 -0600
d3dx9: Adjust ID3DXEffect interface based on DLL version.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx9_36/effect.c | 8 ++++++++
include/d3dx9effect.h | 13 ++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index 7f54e25..87eaf86 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -4354,6 +4354,7 @@ static HRESULT WINAPI ID3DXEffectImpl_ApplyParameterBlock(ID3DXEffect* iface, D3
return E_NOTIMPL;
}
+#if D3DX_SDK_VERSION >= 26
static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D3DXHANDLE parameter_block)
{
struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface);
@@ -4362,6 +4363,7 @@ static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D
return E_NOTIMPL;
}
+#endif
static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
struct IDirect3DDevice9 *device, struct ID3DXEffect **effect)
@@ -4382,6 +4384,7 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
return E_NOTIMPL;
}
+#if D3DX_SDK_VERSION >= 27
static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect *iface,
D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes)
{
@@ -4390,6 +4393,7 @@ static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect *iface,
return E_NOTIMPL;
}
+#endif
static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl =
{
@@ -4472,9 +4476,13 @@ static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl =
ID3DXEffectImpl_BeginParameterBlock,
ID3DXEffectImpl_EndParameterBlock,
ID3DXEffectImpl_ApplyParameterBlock,
+#if D3DX_SDK_VERSION >= 26
ID3DXEffectImpl_DeleteParameterBlock,
+#endif
ID3DXEffectImpl_CloneEffect,
+#if D3DX_SDK_VERSION >= 27
ID3DXEffectImpl_SetRawValue
+#endif
};
static inline struct ID3DXEffectCompilerImpl *impl_from_ID3DXEffectCompiler(ID3DXEffectCompiler *iface)
diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h
index 8235794..5dd1e75 100644
--- a/include/d3dx9effect.h
+++ b/include/d3dx9effect.h
@@ -197,7 +197,13 @@ DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
typedef struct ID3DXEffect *LPD3DXEFFECT;
-DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
+#if D3DX_SDK_VERSION <= 25
+DEFINE_GUID(IID_ID3DXEffect, 0xd165ccb1, 0x62b0, 0x4a33, 0xb3, 0xfa, 0xa9, 0x23, 0x00, 0x30, 0x5a, 0x11);
+#elif D3DX_SDK_VERSION == 26
+DEFINE_GUID(IID_ID3DXEffect, 0xc7b17651, 0x5420, 0x490e, 0x8a, 0x7f, 0x92, 0x36, 0x75, 0xa2, 0xd6, 0x87);
+#else
+DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0x0c, 0xd5);
+#endif
#define INTERFACE ID3DXEffect
@@ -282,10 +288,15 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
STDMETHOD(BeginParameterBlock)(THIS) PURE;
STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
+#if D3DX_SDK_VERSION >= 26
STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
+#endif
STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) PURE;
+#if D3DX_SDK_VERSION >= 27
STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) PURE;
+#endif
};
+
#undef INTERFACE
typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
More information about the wine-cvs
mailing list