ddraw: Return DDERR_NOEXCLUSIVEMODE in ddraw_surface7_Flip() when not in exclusive mode.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2015-12-04 11:30:13 +01:00 committed by Alexandre Julliard
parent 7aefdc2f18
commit 83f10e2251
1 changed files with 7 additions and 0 deletions

View File

@ -1239,6 +1239,13 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Flip(IDirectDrawSurface7
wined3d_mutex_lock();
if (!(dst_impl->ddraw->cooperative_level & DDSCL_EXCLUSIVE))
{
WARN("Not in exclusive mode.\n");
wined3d_mutex_unlock();
return DDERR_NOEXCLUSIVEMODE;
}
tmp_rtv = ddraw_surface_get_rendertarget_view(dst_impl);
tmp = dst_impl->wined3d_surface;
texture = dst_impl->wined3d_texture;