From dbc0e72d17fc5c226d961f7ed3c8a9a224a357f6 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 5 Jun 2011 22:48:54 +0200 Subject: [PATCH] d3d9: Just return the resource type in IDirect3DResource8::GetType() implementations. --- dlls/d3d9/cubetexture.c | 9 +-------- dlls/d3d9/texture.c | 9 +-------- dlls/d3d9/volumetexture.c | 9 +-------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/dlls/d3d9/cubetexture.c b/dlls/d3d9/cubetexture.c index 1f5e27b803..a4b07f0bf9 100644 --- a/dlls/d3d9/cubetexture.c +++ b/dlls/d3d9/cubetexture.c @@ -197,16 +197,9 @@ static void WINAPI IDirect3DCubeTexture9Impl_PreLoad(IDirect3DCubeTexture9 *ifac static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture9Impl_GetType(IDirect3DCubeTexture9 *iface) { - IDirect3DCubeTexture9Impl *This = impl_from_IDirect3DCubeTexture9(iface); - D3DRESOURCETYPE ret; - TRACE("iface %p.\n", iface); - wined3d_mutex_lock(); - ret = wined3d_texture_get_type(This->wined3d_texture); - wined3d_mutex_unlock(); - - return ret; + return D3DRTYPE_CUBETEXTURE; } /* IDirect3DCubeTexture9 IDirect3DBaseTexture9 Interface follow: */ diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index d1df0f5ee7..970028b87c 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -192,16 +192,9 @@ static void WINAPI IDirect3DTexture9Impl_PreLoad(IDirect3DTexture9 *iface) static D3DRESOURCETYPE WINAPI IDirect3DTexture9Impl_GetType(IDirect3DTexture9 *iface) { - IDirect3DTexture9Impl *This = impl_from_IDirect3DTexture9(iface); - HRESULT ret; - TRACE("iface %p.\n", iface); - wined3d_mutex_lock(); - ret = wined3d_texture_get_type(This->wined3d_texture); - wined3d_mutex_unlock(); - - return ret; + return D3DRTYPE_TEXTURE; } /* IDirect3DTexture9 IDirect3DBaseTexture9 Interface follow: */ diff --git a/dlls/d3d9/volumetexture.c b/dlls/d3d9/volumetexture.c index 9528e9b8dd..d5a1bcc57d 100644 --- a/dlls/d3d9/volumetexture.c +++ b/dlls/d3d9/volumetexture.c @@ -192,16 +192,9 @@ static void WINAPI IDirect3DVolumeTexture9Impl_PreLoad(IDirect3DVolumeTexture9 * static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture9Impl_GetType(IDirect3DVolumeTexture9 *iface) { - IDirect3DVolumeTexture9Impl *This = impl_from_IDirect3DVolumeTexture9(iface); - D3DRESOURCETYPE type; - TRACE("iface %p.\n", iface); - wined3d_mutex_lock(); - type = wined3d_texture_get_type(This->wined3d_texture); - wined3d_mutex_unlock(); - - return type; + return D3DRTYPE_VOLUMETEXTURE; } static DWORD WINAPI IDirect3DVolumeTexture9Impl_SetLOD(IDirect3DVolumeTexture9 *iface, DWORD LODNew)