ddraw/tests: Recognise E_NOTIMPL returned from UpdateOverlay() on VMware as broken.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-12-27 17:30:15 +01:00 committed by Alexandre Julliard
parent 7c9671c002
commit 2a0f704d9b
4 changed files with 44 additions and 4 deletions

View file

@ -123,6 +123,15 @@ static BOOL ddraw_is_intel(IDirectDraw *ddraw)
&& identifier.dwVendorId == 0x8086;
}
static BOOL ddraw_is_vmware(IDirectDraw *ddraw)
{
DDDEVICEIDENTIFIER identifier;
return strcmp(winetest_platform, "wine")
&& ddraw_get_identifier(ddraw, &identifier)
&& identifier.dwVendorId == 0x15ad;
}
static IDirectDrawSurface *create_overlay(IDirectDraw *ddraw,
unsigned int width, unsigned int height, DWORD format)
{
@ -8666,7 +8675,8 @@ 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. */

View file

@ -125,6 +125,15 @@ static BOOL ddraw_is_intel(IDirectDraw2 *ddraw)
&& identifier.dwVendorId == 0x8086;
}
static BOOL ddraw_is_vmware(IDirectDraw2 *ddraw)
{
DDDEVICEIDENTIFIER identifier;
return strcmp(winetest_platform, "wine")
&& ddraw_get_identifier(ddraw, &identifier)
&& identifier.dwVendorId == 0x15ad;
}
static IDirectDrawSurface *create_overlay(IDirectDraw2 *ddraw,
unsigned int width, unsigned int height, DWORD format)
{
@ -9800,7 +9809,8 @@ 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. */

View file

@ -131,6 +131,15 @@ static BOOL ddraw_is_intel(IDirectDraw4 *ddraw)
&& identifier.dwVendorId == 0x8086;
}
static BOOL ddraw_is_vmware(IDirectDraw4 *ddraw)
{
DDDEVICEIDENTIFIER identifier;
return strcmp(winetest_platform, "wine")
&& ddraw_get_identifier(ddraw, &identifier)
&& identifier.dwVendorId == 0x15ad;
}
static IDirectDrawSurface4 *create_overlay(IDirectDraw4 *ddraw,
unsigned int width, unsigned int height, DWORD format)
{
@ -11262,7 +11271,8 @@ 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. */

View file

@ -145,6 +145,15 @@ static BOOL ddraw_is_intel(IDirectDraw7 *ddraw)
&& identifier.dwVendorId == 0x8086;
}
static BOOL ddraw_is_vmware(IDirectDraw7 *ddraw)
{
DDDEVICEIDENTIFIER2 identifier;
return strcmp(winetest_platform, "wine")
&& ddraw_get_identifier(ddraw, &identifier)
&& identifier.dwVendorId == 0x15ad;
}
static IDirectDrawSurface7 *create_overlay(IDirectDraw7 *ddraw,
unsigned int width, unsigned int height, DWORD format)
{
@ -11220,7 +11229,8 @@ 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. */