Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- v2: Fixed compilation error on old GCC
dlls/ddraw/tests/ddraw1.c | 10 +++++++++- dlls/ddraw/tests/ddraw2.c | 10 +++++++++- dlls/ddraw/tests/ddraw4.c | 10 +++++++++- dlls/ddraw/tests/ddraw7.c | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 56916d6568..3f77ca10b5 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -120,6 +120,12 @@ static BOOL ddraw_is_intel(IDirectDraw *ddraw) return identifier.dwVendorId == 0x8086; }
+static BOOL ddraw_is_vmware(IDirectDraw *ddraw) +{ + DDDEVICEIDENTIFIER identifier = ddraw_dev_id(ddraw); + return identifier.dwVendorId == 0x15ad; +} + static IDirectDrawSurface *create_overlay(IDirectDraw *ddraw, unsigned int width, unsigned int height, DWORD format) { @@ -8663,7 +8669,9 @@ static void test_offscreen_overlay(void) ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr);
hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()), + ok(SUCCEEDED(hr) || + broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || + broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), "Failed to update overlay, hr %#x.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index a92e4dc50f..ad248a669f 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -122,6 +122,12 @@ static BOOL ddraw_is_intel(IDirectDraw2 *ddraw) return identifier.dwVendorId == 0x8086; }
+static BOOL ddraw_is_vmware(IDirectDraw2 *ddraw) +{ + DDDEVICEIDENTIFIER identifier = ddraw_dev_id(ddraw); + return identifier.dwVendorId == 0x15ad; +} + static IDirectDrawSurface *create_overlay(IDirectDraw2 *ddraw, unsigned int width, unsigned int height, DWORD format) { @@ -9797,7 +9803,9 @@ static void test_offscreen_overlay(void) ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr);
hr = IDirectDrawSurface_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()), + ok(SUCCEEDED(hr) || + broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || + broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), "Failed to update overlay, hr %#x.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 5a356af4c5..abf393710d 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -128,6 +128,12 @@ static BOOL ddraw_is_intel(IDirectDraw4 *ddraw) return identifier.dwVendorId == 0x8086; }
+static BOOL ddraw_is_vmware(IDirectDraw4 *ddraw) +{ + DDDEVICEIDENTIFIER identifier = ddraw_dev_id(ddraw); + return identifier.dwVendorId == 0x15ad; +} + static IDirectDrawSurface4 *create_overlay(IDirectDraw4 *ddraw, unsigned int width, unsigned int height, DWORD format) { @@ -11259,7 +11265,9 @@ static void test_offscreen_overlay(void) ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr);
hr = IDirectDrawSurface4_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()), + ok(SUCCEEDED(hr) || + broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || + broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), "Failed to update overlay, hr %#x.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */ diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index a8b1a8ed92..4b5c5561d3 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -138,6 +138,12 @@ static BOOL ddraw_is_intel(IDirectDraw7 *ddraw) return identifier.dwVendorId == 0x8086; }
+static BOOL ddraw_is_vmware(IDirectDraw7 *ddraw) +{ + DDDEVICEIDENTIFIER2 identifier = ddraw_dev_id(ddraw); + return identifier.dwVendorId == 0x15ad; +} + static IDirectDrawSurface7 *create_overlay(IDirectDraw7 *ddraw, unsigned int width, unsigned int height, DWORD format) { @@ -11220,7 +11226,9 @@ static void test_offscreen_overlay(void) ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n",hr);
hr = IDirectDrawSurface7_UpdateOverlay(overlay, NULL, offscreen, NULL, DDOVER_SHOW, NULL); - ok(SUCCEEDED(hr) || broken(hr == DDERR_OUTOFCAPS && dwm_enabled()), + ok(SUCCEEDED(hr) || + broken(hr == DDERR_OUTOFCAPS && dwm_enabled()) || + broken(hr == E_NOTIMPL && ddraw_is_vmware(ddraw)), "Failed to update overlay, hr %#x.\n", hr);
/* Try to overlay the primary with a non-overlay surface. */