Henri Verbeet : ddraw: Reject flips of surfaces with themselves.
Alexandre Julliard
julliard at winehq.org
Wed Dec 4 14:43:34 CST 2013
Module: wine
Branch: master
Commit: ab8d59c29ddb3f38379b8eab59913c785dc80845
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ab8d59c29ddb3f38379b8eab59913c785dc80845
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Dec 4 09:49:33 2013 +0100
ddraw: Reject flips of surfaces with themselves.
---
dlls/ddraw/surface.c | 2 +-
dlls/ddraw/tests/ddraw1.c | 2 +-
dlls/ddraw/tests/ddraw2.c | 2 +-
dlls/ddraw/tests/ddraw4.c | 2 +-
dlls/ddraw/tests/ddraw7.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 0704744..8d35d1e 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -1197,7 +1197,7 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
TRACE("iface %p, dst %p, flags %#x.\n", iface, DestOverride, Flags);
- if (!(surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER | DDSCAPS_OVERLAY)))
+ if (DestOverride == iface || !(surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_FRONTBUFFER | DDSCAPS_OVERLAY)))
return DDERR_NOTFLIPPABLE;
wined3d_mutex_lock();
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 2d62ec6..64f8f37 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -3623,7 +3623,7 @@ static void test_flip(void)
IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface_Flip(primary, primary, DDFLIP_WAIT);
- todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer2, NULL, DDFLIP_WAIT);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 417e0be..77a1419 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -4304,7 +4304,7 @@ static void test_flip(void)
IDirectDrawSurface_Release(surface);
hr = IDirectDrawSurface_Flip(primary, primary, DDFLIP_WAIT);
- todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(backbuffer2, NULL, DDFLIP_WAIT);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index b1b01bb..994bfb3 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -4908,7 +4908,7 @@ static void test_flip(void)
IDirectDrawSurface4_Release(surface);
hr = IDirectDrawSurface4_Flip(primary, primary, DDFLIP_WAIT);
- todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(backbuffer2, NULL, DDFLIP_WAIT);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index fe1d35f..2ea98cb 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -4795,7 +4795,7 @@ static void test_flip(void)
IDirectDrawSurface7_Release(surface);
hr = IDirectDrawSurface7_Flip(primary, primary, DDFLIP_WAIT);
- todo_wine ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(backbuffer1, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOTFLIPPABLE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(backbuffer2, NULL, DDFLIP_WAIT);
More information about the wine-cvs
mailing list