d3drm: Return a IDirect3DRMTexture in texture loading methods instead of error
André Hentschel
nerv at dawncrow.de
Sun May 5 14:03:33 CDT 2013
This brings the app of http://bugs.winehq.org/show_bug.cgi?id=21670 further
---
dlls/d3drm/d3drm.c | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c
index 9c3c21f..5d33402 100644
--- a/dlls/d3drm/d3drm.c
+++ b/dlls/d3drm/d3drm.c
@@ -317,22 +317,24 @@ static HRESULT WINAPI IDirect3DRMImpl_CreateUserVisual(IDirect3DRM* iface, D3DRM
return E_NOTIMPL;
}
-static HRESULT WINAPI IDirect3DRMImpl_LoadTexture(IDirect3DRM* iface, const char * filename, LPDIRECT3DRMTEXTURE * ppTexture)
+static HRESULT WINAPI IDirect3DRMImpl_LoadTexture(IDirect3DRM* iface, const char* filename,
+ LPDIRECT3DRMTEXTURE* Texture)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
- FIXME("(%p/%p)->(%s,%p): stub\n", iface, This, filename, ppTexture);
+ FIXME("(%p/%p)->(%s,%p): stub\n", iface, This, filename, Texture);
- return E_NOTIMPL;
+ return Direct3DRMTexture_create(&IID_IDirect3DRMTexture, (IUnknown **)Texture);
}
-static HRESULT WINAPI IDirect3DRMImpl_LoadTextureFromResource(IDirect3DRM* iface, HRSRC rs, LPDIRECT3DRMTEXTURE * ppTexture)
+static HRESULT WINAPI IDirect3DRMImpl_LoadTextureFromResource(IDirect3DRM* iface, HRSRC rs,
+ LPDIRECT3DRMTEXTURE* Texture)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface);
- FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, rs, ppTexture);
+ FIXME("(%p/%p)->(%p,%p): stub\n", iface, This, rs, Texture);
- return E_NOTIMPL;
+ return Direct3DRMTexture_create(&IID_IDirect3DRMTexture, (IUnknown **)Texture);
}
static HRESULT WINAPI IDirect3DRMImpl_SetSearchPath(IDirect3DRM* iface, LPCSTR path)
@@ -699,25 +701,25 @@ static HRESULT WINAPI IDirect3DRM2Impl_CreateUserVisual(IDirect3DRM2* iface,
return E_NOTIMPL;
}
-static HRESULT WINAPI IDirect3DRM2Impl_LoadTexture(IDirect3DRM2* iface, const char * filename,
- LPDIRECT3DRMTEXTURE2 * ppTexture)
+static HRESULT WINAPI IDirect3DRM2Impl_LoadTexture(IDirect3DRM2* iface, const char* filename,
+ LPDIRECT3DRMTEXTURE2* Texture)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
- FIXME("(%p/%p)->(%s,%p): stub\n", iface, This, filename, ppTexture);
+ FIXME("(%p/%p)->(%s,%p): stub\n", iface, This, filename, Texture);
- return E_NOTIMPL;
+ return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2, (IUnknown **)Texture);
}
static HRESULT WINAPI IDirect3DRM2Impl_LoadTextureFromResource(IDirect3DRM2* iface, HMODULE hModule,
LPCSTR strName, LPCSTR strType,
- LPDIRECT3DRMTEXTURE2 * ppTexture)
+ LPDIRECT3DRMTEXTURE2* Texture)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM2(iface);
- FIXME("(%p/%p)->(%p,%p,%p,%p): stub\n", iface, This, hModule, strName, strType, ppTexture);
+ FIXME("(%p/%p)->(%p,%p,%p,%p): stub\n", iface, This, hModule, strName, strType, Texture);
- return E_NOTIMPL;
+ return Direct3DRMTexture_create(&IID_IDirect3DRMTexture2, (IUnknown **)Texture);
}
static HRESULT WINAPI IDirect3DRM2Impl_SetSearchPath(IDirect3DRM2* iface, LPCSTR path)
@@ -1116,18 +1118,18 @@ static HRESULT WINAPI IDirect3DRM3Impl_LoadTexture(IDirect3DRM3* iface, const ch
FIXME("(%p/%p)->(%s,%p): stub\n", iface, This, filename, Texture);
- return E_NOTIMPL;
+ return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3, (IUnknown **)Texture);
}
static HRESULT WINAPI IDirect3DRM3Impl_LoadTextureFromResource(IDirect3DRM3* iface, HMODULE mod,
LPCSTR strName, LPCSTR strType,
- LPDIRECT3DRMTEXTURE3 * ppTexture)
+ LPDIRECT3DRMTEXTURE3* Texture)
{
IDirect3DRMImpl *This = impl_from_IDirect3DRM3(iface);
- FIXME("(%p/%p)->(%p,%p,%p,%p): stub\n", iface, This, mod, strName, strType, ppTexture);
+ FIXME("(%p/%p)->(%p,%p,%p,%p): stub\n", iface, This, mod, strName, strType, Texture);
- return E_NOTIMPL;
+ return Direct3DRMTexture_create(&IID_IDirect3DRMTexture3, (IUnknown **)Texture);
}
static HRESULT WINAPI IDirect3DRM3Impl_SetSearchPath(IDirect3DRM3* iface, LPCSTR path)
--
1.7.10.4
More information about the wine-patches
mailing list