From: Aaryaman Vasishta Subject: [PATCH 1/7] d3drm: Use CreateObject in IDirect3DRM*::LoadTexture. Message-Id: <1463174497-50916-1-git-send-email-jem456.vasishta@gmail.com> Date: Sat, 14 May 2016 02:51:31 +0530 Signed-off-by: Aaryaman Vasishta --- dlls/d3drm/d3drm.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index edb46df..620eeaa 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -413,16 +413,13 @@ static HRESULT WINAPI d3drm1_CreateUserVisual(IDirect3DRM *iface, static HRESULT WINAPI d3drm1_LoadTexture(IDirect3DRM *iface, const char *filename, IDirect3DRMTexture **texture) { - struct d3drm_texture *object; HRESULT hr; FIXME("iface %p, filename %s, texture %p stub!\n", iface, debugstr_a(filename), texture); - if (FAILED(hr = d3drm_texture_create(&object))) + if (FAILED(hr = IDirect3DRM_CreateObject(iface, &CLSID_CDirect3DRMTexture, NULL, &IID_IDirect3DRMTexture, (void **)texture))) return hr; - *texture = &object->IDirect3DRMTexture_iface; - return D3DRM_OK; } @@ -857,16 +854,13 @@ static HRESULT WINAPI d3drm2_CreateUserVisual(IDirect3DRM2 *iface, static HRESULT WINAPI d3drm2_LoadTexture(IDirect3DRM2 *iface, const char *filename, IDirect3DRMTexture2 **texture) { - struct d3drm_texture *object; HRESULT hr; FIXME("iface %p, filename %s, texture %p stub!\n", iface, debugstr_a(filename), texture); - if (FAILED(hr = d3drm_texture_create(&object))) + if (FAILED(hr = IDirect3DRM2_CreateObject(iface, &CLSID_CDirect3DRMTexture, NULL, &IID_IDirect3DRMTexture2, (void **)texture))) return hr; - *texture = &object->IDirect3DRMTexture2_iface; - return D3DRM_OK; } @@ -1396,16 +1390,13 @@ static HRESULT WINAPI d3drm3_CreateUserVisual(IDirect3DRM3 *iface, static HRESULT WINAPI d3drm3_LoadTexture(IDirect3DRM3 *iface, const char *filename, IDirect3DRMTexture3 **texture) { - struct d3drm_texture *object; HRESULT hr; FIXME("iface %p, filename %s, texture %p stub!\n", iface, debugstr_a(filename), texture); - if (FAILED(hr = d3drm_texture_create(&object))) + if (FAILED(hr = IDirect3DRM3_CreateObject(iface, &CLSID_CDirect3DRMTexture, NULL, &IID_IDirect3DRMTexture3, (void **)texture))) return hr; - *texture = &object->IDirect3DRMTexture3_iface; - return D3DRM_OK; } -- 2.3.2 (Apple Git-55)