[PATCH 5/6] d3d9: Forward Volume::UnlockBox to VolumeTexture::UnlockBox.
Stefan Dösinger
stefan at codeweavers.com
Thu Apr 17 08:47:32 CDT 2014
---
dlls/d3d9/texture.c | 5 ++---
dlls/d3d9/volume.c | 8 ++------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c
index 19442b0..7e8dd68 100644
--- a/dlls/d3d9/texture.c
+++ b/dlls/d3d9/texture.c
@@ -1160,7 +1160,6 @@ static HRESULT WINAPI d3d9_texture_3d_UnlockBox(IDirect3DVolumeTexture9 *iface,
{
struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);
struct wined3d_resource *sub_resource;
- struct d3d9_volume *volume_impl;
HRESULT hr;
TRACE("iface %p, level %u.\n", iface, level);
@@ -1170,8 +1169,8 @@ static HRESULT WINAPI d3d9_texture_3d_UnlockBox(IDirect3DVolumeTexture9 *iface,
hr = D3DERR_INVALIDCALL;
else
{
- volume_impl = wined3d_resource_get_parent(sub_resource);
- hr = IDirect3DVolume9_UnlockBox(&volume_impl->IDirect3DVolume9_iface);
+ struct wined3d_volume *volume = wined3d_volume_from_resource(sub_resource);
+ hr = wined3d_volume_unmap(volume);
}
wined3d_mutex_unlock();
diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c
index 5d7e198..07f15ca 100644
--- a/dlls/d3d9/volume.c
+++ b/dlls/d3d9/volume.c
@@ -189,15 +189,11 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
{
struct d3d9_volume *volume = impl_from_IDirect3DVolume9(iface);
- HRESULT hr;
TRACE("iface %p.\n", iface);
- wined3d_mutex_lock();
- hr = wined3d_volume_unmap(volume->wined3d_volume);
- wined3d_mutex_unlock();
-
- return hr;
+ return IDirect3DVolumeTexture9_UnlockBox((IDirect3DVolumeTexture9 *)volume->container,
+ volume->level);
}
static const struct IDirect3DVolume9Vtbl d3d9_volume_vtbl =
--
1.8.3.2
More information about the wine-patches
mailing list