Commit 256d4331 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Implement d3d9_device_PresentEx().

parent 035b79eb
......@@ -610,7 +610,8 @@ static HRESULT WINAPI d3d8_device_Present(IDirect3DDevice8 *iface, const RECT *s
iface, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), dst_window_override, dirty_region);
wined3d_mutex_lock();
hr = wined3d_device_present(device->wined3d_device, src_rect, dst_rect, dst_window_override, dirty_region);
hr = wined3d_device_present(device->wined3d_device, src_rect, dst_rect,
dst_window_override, dirty_region, 0);
wined3d_mutex_unlock();
return hr;
......
......@@ -584,11 +584,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
iface, src_rect, dst_rect, dst_window_override, dirty_region);
wined3d_mutex_lock();
hr = wined3d_device_present(device->wined3d_device, src_rect, dst_rect, dst_window_override, dirty_region);
hr = wined3d_device_present(device->wined3d_device, src_rect, dst_rect,
dst_window_override, dirty_region, 0);
wined3d_mutex_unlock();
return hr;
}
}
static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT swapchain,
UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface9 **backbuffer)
......@@ -2818,10 +2819,19 @@ static HRESULT WINAPI d3d9_device_PresentEx(IDirect3DDevice9Ex *iface,
const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override,
const RGNDATA *dirty_region, DWORD flags)
{
FIXME("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p, flags %#x stub!\n",
iface, src_rect, dst_rect, dst_window_override, dirty_region, flags);
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
HRESULT hr;
return E_NOTIMPL;
TRACE("iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n",
iface, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect),
dst_window_override, dirty_region, flags);
wined3d_mutex_lock();
hr = wined3d_device_present(device->wined3d_device, src_rect, dst_rect,
dst_window_override, dirty_region, flags);
wined3d_mutex_unlock();
return hr;
}
static HRESULT WINAPI d3d9_device_GetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT *priority)
......
......@@ -3821,18 +3821,18 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
}
HRESULT CDECL wined3d_device_present(const struct wined3d_device *device, const RECT *src_rect,
const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region)
const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region, DWORD flags)
{
UINT i;
TRACE("device %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p.\n",
TRACE("device %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n",
device, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect),
dst_window_override, dirty_region);
dst_window_override, dirty_region, flags);
for (i = 0; i < device->swapchain_count; ++i)
{
wined3d_swapchain_present(device->swapchains[i], src_rect,
dst_rect, dst_window_override, dirty_region, 0);
dst_rect, dst_window_override, dirty_region, flags);
}
return WINED3D_OK;
......
......@@ -150,6 +150,9 @@ HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
swapchain, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect),
dst_window_override, dirty_region, flags);
if (flags)
FIXME("Ignoring flags %#x.\n", flags);
if (!swapchain->back_buffers)
{
WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL\n");
......
......@@ -2181,7 +2181,7 @@ HRESULT __cdecl wined3d_device_init_gdi(struct wined3d_device *device, struct wi
HRESULT __cdecl wined3d_device_multiply_transform(struct wined3d_device *device,
enum wined3d_transform_state state, const struct wined3d_matrix *matrix);
HRESULT __cdecl wined3d_device_present(const struct wined3d_device *device, const RECT *src_rect,
const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region);
const RECT *dst_rect, HWND dst_window_override, const RGNDATA *dirty_region, DWORD flags);
HRESULT __cdecl wined3d_device_process_vertices(struct wined3d_device *device,
UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer,
const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment