[PATCH 1/5] d3d8: call wined3d_swapchain_get_front_buffer_data instead of wined3d_device_get_front_buffer_data in d3d8_device_GetFrontBuffer
Riccardo Bortolato
rikyz619 at gmail.com
Thu Oct 15 08:41:23 CDT 2015
Signed-off-by: Riccardo Bortolato <rikyz619 at gmail.com>
---
dlls/d3d8/device.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 0648f51..04881cd 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1155,6 +1155,7 @@ static HRESULT WINAPI d3d8_device_GetFrontBuffer(IDirect3DDevice8 *iface, IDirec
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
struct d3d8_surface *dst_impl = unsafe_impl_from_IDirect3DSurface8(dst_surface);
+ struct wined3d_swapchain *swapchain;
HRESULT hr;
TRACE("iface %p, dst_surface %p.\n", iface, dst_surface);
@@ -1166,7 +1167,10 @@ static HRESULT WINAPI d3d8_device_GetFrontBuffer(IDirect3DDevice8 *iface, IDirec
}
wined3d_mutex_lock();
- hr = wined3d_device_get_front_buffer_data(device->wined3d_device, 0, dst_impl->wined3d_surface);
+ if (!(swapchain = wined3d_device_get_swapchain(device->wined3d_device, 0)))
+ hr = D3DERR_INVALIDCALL;
+ else
+ hr = wined3d_swapchain_get_front_buffer_data(swapchain, dst_impl->wined3d_surface);
wined3d_mutex_unlock();
return hr;
--
1.9.1
More information about the wine-patches
mailing list