d3d9: Implement d3d9_device_PresentEx().

This commit is contained in:
Henri Verbeet 2012-06-29 07:37:56 +02:00 committed by Alexandre Julliard
parent 035b79ebcf
commit 256d433164
5 changed files with 25 additions and 11 deletions

View File

@ -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); iface, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), dst_window_override, dirty_region);
wined3d_mutex_lock(); 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(); wined3d_mutex_unlock();
return hr; return hr;

View File

@ -584,11 +584,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
iface, src_rect, dst_rect, dst_window_override, dirty_region); iface, src_rect, dst_rect, dst_window_override, dirty_region);
wined3d_mutex_lock(); 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(); wined3d_mutex_unlock();
return hr; return hr;
} }
static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT swapchain, static HRESULT WINAPI d3d9_device_GetBackBuffer(IDirect3DDevice9Ex *iface, UINT swapchain,
UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface9 **backbuffer) 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 RECT *src_rect, const RECT *dst_rect, HWND dst_window_override,
const RGNDATA *dirty_region, DWORD flags) 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", struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
iface, src_rect, dst_rect, dst_window_override, dirty_region, flags); 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) static HRESULT WINAPI d3d9_device_GetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT *priority)

View File

@ -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, 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; 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), 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) for (i = 0; i < device->swapchain_count; ++i)
{ {
wined3d_swapchain_present(device->swapchains[i], src_rect, 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; return WINED3D_OK;

View File

@ -150,6 +150,9 @@ HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
swapchain, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), swapchain, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect),
dst_window_override, dirty_region, flags); dst_window_override, dirty_region, flags);
if (flags)
FIXME("Ignoring flags %#x.\n", flags);
if (!swapchain->back_buffers) if (!swapchain->back_buffers)
{ {
WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL\n"); WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL\n");

View File

@ -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, HRESULT __cdecl wined3d_device_multiply_transform(struct wined3d_device *device,
enum wined3d_transform_state state, const struct wined3d_matrix *matrix); enum wined3d_transform_state state, const struct wined3d_matrix *matrix);
HRESULT __cdecl wined3d_device_present(const struct wined3d_device *device, const RECT *src_rect, 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, 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, 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); const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf);