=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: d3drm: Return a IDirect3DRMTexture in texture loading methods instead of error.

Alexandre Julliard julliard at winehq.org
Tue May 7 15:54:05 CDT 2013


Module: wine
Branch: master
Commit: 7f5a3a4d802a138c191dfd62e3a0ad02998df04d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7f5a3a4d802a138c191dfd62e3a0ad02998df04d

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun May  5 21:03:33 2013 +0200

d3drm: Return a IDirect3DRMTexture in texture loading methods instead of error.

---

 dlls/d3drm/d3drm.c |   36 +++++++++++++++++++-----------------
 1 files 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)




More information about the wine-cvs mailing list