Wine-Devel
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 8 participants
- 84547 discussions
July 28, 2020
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
include/wine/condrv.h | 3 +-
server/console.c | 90 +++++++++++++++++++++++++++++++++++++++++--
server/trace.c | 1 +
3 files changed, 90 insertions(+), 4 deletions(-)
1
0
[PATCH v2 1/3] ddraw/tests: Test non-primary surface in test_lost_device.
by Gabriel Ivăncescu July 28, 2020
by Gabriel Ivăncescu July 28, 2020
July 28, 2020
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/ddraw/tests/ddraw1.c | 48 +++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw2.c | 48 +++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw4.c | 50 ++++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw7.c | 52 ++++++++++++++++++++++++++++++++++++++-
4 files changed, 194 insertions(+), 4 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 652e52a..a8e842e 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -7309,7 +7309,7 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
- IDirectDrawSurface *surface, *back_buffer;
+ IDirectDrawSurface *surface, *surface2, *back_buffer;
IDirectDrawSurface *sysmem_surface;
DDSURFACEDESC surface_desc;
HWND window1, window2;
@@ -7336,6 +7336,21 @@ static void test_lost_device(void)
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
+ surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface2, NULL);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
@@ -7349,6 +7364,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7358,6 +7375,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7367,6 +7386,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7376,6 +7397,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7386,6 +7409,8 @@ static void test_lost_device(void)
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST),
"Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7406,6 +7431,8 @@ static void test_lost_device(void)
ok(ret, "Failed to set foreground window.\n");
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST || broken(hr == DD_OK) /* WinXP */, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7413,6 +7440,8 @@ static void test_lost_device(void)
ok(ret, "Failed to set foreground window.\n");
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST || broken(hr == DD_OK) /* WinXP */, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7420,6 +7449,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7427,6 +7458,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7445,6 +7478,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7454,6 +7489,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7463,6 +7500,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7472,6 +7511,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7481,6 +7522,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7490,6 +7533,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7507,6 +7552,7 @@ static void test_lost_device(void)
IDirectDrawSurface_Release(back_buffer);
IDirectDrawSurface_Release(sysmem_surface);
+ IDirectDrawSurface_Release(surface2);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index edaf868..1c0ccd9 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -8262,7 +8262,7 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
- IDirectDrawSurface *surface, *back_buffer;
+ IDirectDrawSurface *surface, *surface2, *back_buffer;
IDirectDrawSurface *sysmem_surface;
DDSURFACEDESC surface_desc;
HWND window1, window2;
@@ -8289,6 +8289,21 @@ static void test_lost_device(void)
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
+ surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface2, NULL);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
@@ -8302,6 +8317,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8311,6 +8328,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8320,6 +8339,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8329,6 +8350,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8338,6 +8361,8 @@ static void test_lost_device(void)
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8358,6 +8383,8 @@ static void test_lost_device(void)
ok(ret, "Failed to set foreground window.\n");
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8365,6 +8392,8 @@ static void test_lost_device(void)
ok(ret, "Failed to set foreground window.\n");
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8372,6 +8401,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8379,6 +8410,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8397,6 +8430,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8406,6 +8441,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8415,6 +8452,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8424,6 +8463,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8433,6 +8474,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8442,6 +8485,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8459,6 +8504,7 @@ static void test_lost_device(void)
IDirectDrawSurface_Release(back_buffer);
IDirectDrawSurface_Release(sysmem_surface);
+ IDirectDrawSurface_Release(surface2);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw2_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index d1abde0..97318bd 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -9655,7 +9655,7 @@ static void test_vb_writeonly(void)
static void test_lost_device(void)
{
- IDirectDrawSurface4 *surface, *back_buffer;
+ IDirectDrawSurface4 *surface, *surface2, *back_buffer;
IDirectDrawSurface4 *sysmem_surface;
DDSURFACEDESC2 surface_desc;
HWND window1, window2;
@@ -9682,6 +9682,21 @@ static void test_lost_device(void)
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+ U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &surface2, NULL);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
@@ -9697,6 +9712,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9708,6 +9725,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9719,6 +9738,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9730,6 +9751,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9741,6 +9764,8 @@ static void test_lost_device(void)
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9758,6 +9783,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9767,6 +9794,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9776,6 +9805,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9785,6 +9816,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9794,6 +9827,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9814,6 +9849,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9825,6 +9862,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9836,6 +9875,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9847,6 +9888,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9858,6 +9901,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9867,6 +9912,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface4_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9887,6 +9934,7 @@ static void test_lost_device(void)
IDirectDrawSurface4_Release(back_buffer);
IDirectDrawSurface4_Release(sysmem_surface);
+ IDirectDrawSurface4_Release(surface2);
IDirectDrawSurface4_Release(surface);
refcount = IDirectDraw4_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 13eadfd..bd64134 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -9413,7 +9413,7 @@ static void test_vb_writeonly(void)
static void test_lost_device(void)
{
- IDirectDrawSurface7 *surface, *back_buffer;
+ IDirectDrawSurface7 *surface, *surface2, *back_buffer;
IDirectDrawSurface7 *sysmem_surface;
DDSURFACEDESC2 surface_desc;
HWND window1, window2;
@@ -9440,6 +9440,21 @@ static void test_lost_device(void)
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+ U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface2, NULL);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
@@ -9455,6 +9470,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9466,6 +9483,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9477,6 +9496,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9488,6 +9509,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9499,6 +9522,8 @@ static void test_lost_device(void)
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9511,6 +9536,8 @@ static void test_lost_device(void)
surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9518,6 +9545,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9527,6 +9556,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9536,6 +9567,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9545,6 +9578,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9554,6 +9589,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9574,6 +9611,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9585,6 +9624,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9596,6 +9637,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9607,6 +9650,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9618,6 +9663,8 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9629,6 +9676,8 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_IsLost(surface2);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9647,6 +9696,7 @@ static void test_lost_device(void)
IDirectDrawSurface7_Release(back_buffer);
IDirectDrawSurface7_Release(sysmem_surface);
+ IDirectDrawSurface7_Release(surface2);
IDirectDrawSurface7_Release(surface);
refcount = IDirectDraw7_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
--
2.21.0
4
11
[PATCH v3 1/3] ddraw/tests: Test non-primary video memory surface in test_lost_device.
by Gabriel Ivăncescu July 28, 2020
by Gabriel Ivăncescu July 28, 2020
July 28, 2020
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
v3: Make sure the surface resides in video memory (thanks Stefan).
dlls/ddraw/tests/ddraw1.c | 97 ++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw2.c | 97 ++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw4.c | 102 ++++++++++++++++++++++++++++++++++-
dlls/ddraw/tests/ddraw7.c | 109 +++++++++++++++++++++++++++++++++++++-
4 files changed, 400 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 652e52a..782a3c1 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -7309,8 +7309,8 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
+ IDirectDrawSurface *sysmem_surface, *vidmem_surface;
IDirectDrawSurface *surface, *back_buffer;
- IDirectDrawSurface *sysmem_surface;
DDSURFACEDESC surface_desc;
HWND window1, window2;
IDirectDraw *ddraw;
@@ -7345,12 +7345,36 @@ static void test_lost_device(void)
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
+ surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &vidmem_surface, NULL);
+ if (FAILED(hr))
+ {
+ skip("Failed to create video memory surface, skipping related tests.\n");
+ vidmem_surface = NULL;
+ }
+
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(GetDesktopWindow());
ok(ret, "Failed to set foreground window.\n");
@@ -7360,6 +7384,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -7369,6 +7398,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = restore_surfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7378,6 +7412,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7388,6 +7427,11 @@ static void test_lost_device(void)
"Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#x.\n", hr);
+ }
/* Trying to restore the primary will crash, probably because flippable
* surfaces can't exist in DDSCL_NORMAL. */
@@ -7408,6 +7452,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST || broken(hr == DD_OK) /* WinXP */, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -7415,6 +7464,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST || broken(hr == DD_OK) /* WinXP */, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7422,6 +7476,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = restore_surfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7429,6 +7488,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
IDirectDrawSurface_Release(surface);
memset(&surface_desc, 0, sizeof(surface_desc));
@@ -7447,6 +7511,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7456,6 +7525,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7465,6 +7539,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7474,6 +7553,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7483,6 +7567,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -7492,6 +7581,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
@@ -7506,6 +7600,7 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(back_buffer);
+ if (vidmem_surface) IDirectDrawSurface_Release(vidmem_surface);
IDirectDrawSurface_Release(sysmem_surface);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index edaf868..6680171 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -8262,8 +8262,8 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
+ IDirectDrawSurface *sysmem_surface, *vidmem_surface;
IDirectDrawSurface *surface, *back_buffer;
- IDirectDrawSurface *sysmem_surface;
DDSURFACEDESC surface_desc;
HWND window1, window2;
IDirectDraw2 *ddraw;
@@ -8298,12 +8298,36 @@ static void test_lost_device(void)
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
+ surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &vidmem_surface, NULL);
+ if (FAILED(hr))
+ {
+ skip("Failed to create video memory surface, skipping related tests.\n");
+ vidmem_surface = NULL;
+ }
+
hr = IDirectDrawSurface_IsLost(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(GetDesktopWindow());
ok(ret, "Failed to set foreground window.\n");
@@ -8313,6 +8337,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -8322,6 +8351,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = restore_surfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8331,6 +8365,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8340,6 +8379,11 @@ static void test_lost_device(void)
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
/* Trying to restore the primary will crash, probably because flippable
* surfaces can't exist in DDSCL_NORMAL. */
@@ -8360,6 +8404,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -8367,6 +8416,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8374,6 +8428,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = restore_surfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8381,6 +8440,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
IDirectDrawSurface_Release(surface);
memset(&surface_desc, 0, sizeof(surface_desc));
@@ -8399,6 +8463,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8408,6 +8477,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8417,6 +8491,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8426,6 +8505,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8435,6 +8519,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw2_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -8444,6 +8533,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
@@ -8458,6 +8552,7 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(back_buffer);
+ if (vidmem_surface) IDirectDrawSurface_Release(vidmem_surface);
IDirectDrawSurface_Release(sysmem_surface);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw2_Release(ddraw);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index d1abde0..11e5b46 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -9655,8 +9655,8 @@ static void test_vb_writeonly(void)
static void test_lost_device(void)
{
+ IDirectDrawSurface4 *sysmem_surface, *vidmem_surface;
IDirectDrawSurface4 *surface, *back_buffer;
- IDirectDrawSurface4 *sysmem_surface;
DDSURFACEDESC2 surface_desc;
HWND window1, window2;
IDirectDraw4 *ddraw;
@@ -9691,6 +9691,25 @@ static void test_lost_device(void)
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+ U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &vidmem_surface, NULL);
+ if (FAILED(hr))
+ {
+ skip("Failed to create video memory surface, skipping related tests.\n");
+ vidmem_surface = NULL;
+ }
+
hr = IDirectDraw4_TestCooperativeLevel(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
@@ -9699,6 +9718,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(GetDesktopWindow());
ok(ret, "Failed to set foreground window.\n");
@@ -9710,6 +9734,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -9721,6 +9750,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_RestoreAllSurfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9732,6 +9766,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9743,6 +9782,11 @@ static void test_lost_device(void)
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
/* Trying to restore the primary will crash, probably because flippable
* surfaces can't exist in DDSCL_NORMAL. */
@@ -9760,6 +9804,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(GetDesktopWindow());
ok(ret, "Failed to set foreground window.\n");
@@ -9769,6 +9818,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -9778,6 +9832,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9787,6 +9846,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_RestoreAllSurfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9796,6 +9860,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
IDirectDrawSurface4_Release(surface);
memset(&surface_desc, 0, sizeof(surface_desc));
@@ -9816,6 +9885,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9827,6 +9901,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9838,6 +9917,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9849,6 +9933,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9860,6 +9949,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw4_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9869,6 +9963,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface4_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
@@ -9886,6 +9985,7 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface4_Release(back_buffer);
+ if (vidmem_surface) IDirectDrawSurface4_Release(vidmem_surface);
IDirectDrawSurface4_Release(sysmem_surface);
IDirectDrawSurface4_Release(surface);
refcount = IDirectDraw4_Release(ddraw);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 13eadfd..996471e 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -9413,8 +9413,8 @@ static void test_vb_writeonly(void)
static void test_lost_device(void)
{
+ IDirectDrawSurface7 *sysmem_surface, *vidmem_surface;
IDirectDrawSurface7 *surface, *back_buffer;
- IDirectDrawSurface7 *sysmem_surface;
DDSURFACEDESC2 surface_desc;
HWND window1, window2;
IDirectDraw7 *ddraw;
@@ -9440,6 +9440,21 @@ static void test_lost_device(void)
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
+ surface_desc.dwWidth = 640;
+ surface_desc.dwHeight = 480;
+ U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+ U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &vidmem_surface, NULL);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
@@ -9447,7 +9462,11 @@ static void test_lost_device(void)
surface_desc.dwWidth = 100;
surface_desc.dwHeight = 100;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &sysmem_surface, NULL);
- ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (FAILED(hr))
+ {
+ skip("Failed to create video memory surface, skipping related tests.\n");
+ vidmem_surface = NULL;
+ }
hr = IDirectDraw7_TestCooperativeLevel(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9457,6 +9476,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(GetDesktopWindow());
ok(ret, "Failed to set foreground window.\n");
@@ -9468,6 +9492,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -9479,6 +9508,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_RestoreAllSurfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9490,6 +9524,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9501,6 +9540,11 @@ static void test_lost_device(void)
todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
/* Trying to restore the primary will crash, probably because flippable
* surfaces can't exist in DDSCL_NORMAL. */
@@ -9513,6 +9557,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_TestCooperativeLevel(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9520,6 +9569,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(GetDesktopWindow());
ok(ret, "Failed to set foreground window.\n");
@@ -9529,6 +9583,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
ret = SetForegroundWindow(window1);
ok(ret, "Failed to set foreground window.\n");
@@ -9538,6 +9597,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ todo_wine ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9547,6 +9611,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_RestoreAllSurfaces(ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9556,6 +9625,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
IDirectDrawSurface7_Release(surface);
memset(&surface_desc, 0, sizeof(surface_desc));
@@ -9576,6 +9650,11 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9587,6 +9666,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window1, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9598,6 +9682,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9609,6 +9698,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_NORMAL | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9620,6 +9714,11 @@ static void test_lost_device(void)
ok(hr == DDERR_NOEXCLUSIVEMODE, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ }
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window2, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@@ -9631,6 +9730,11 @@ static void test_lost_device(void)
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(sysmem_surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
+ if (vidmem_surface)
+ {
+ hr = IDirectDrawSurface7_IsLost(vidmem_surface);
+ ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
+ }
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
@@ -9646,6 +9750,7 @@ static void test_lost_device(void)
IDirectDrawSurface7_Release(back_buffer);
+ if (vidmem_surface) IDirectDrawSurface7_Release(vidmem_surface);
IDirectDrawSurface7_Release(sysmem_surface);
IDirectDrawSurface7_Release(surface);
refcount = IDirectDraw7_Release(ddraw);
--
2.21.0
3
9
July 28, 2020
2
1
[PATCH vkd3d 5/5] vkd3d-shader: Trace messages in vkd3d_shader_compile().
by Henri Verbeet July 28, 2020
by Henri Verbeet July 28, 2020
July 28, 2020
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/vkd3d_shader_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index c001883..5597992 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -308,6 +308,7 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
if (!vkd3d_shader_message_context_init(&message_context, compile_info->log_level, compile_info->source_name))
return VKD3D_ERROR;
ret = vkd3d_shader_parser_init(&parser, &compile_info->source, &message_context);
+ vkd3d_shader_message_context_trace_messages(&message_context);
if (messages)
{
vkd3d_shader_free_messages(*messages);
--
2.11.0
1
0
[PATCH vkd3d 4/5] vkd3d-shader: Trace messages in vkd3d_shader_scan_dxbc().
by Henri Verbeet July 28, 2020
by Henri Verbeet July 28, 2020
July 28, 2020
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/vkd3d_shader_main.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index e4f14a7..c001883 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -100,6 +100,23 @@ static int VKD3D_PRINTF_FUNC(2, 3) vkd3d_string_buffer_printf(struct vkd3d_strin
return ret;
}
+static void vkd3d_string_buffer_trace_(const struct vkd3d_string_buffer *buffer, const char *function)
+{
+ const char *p, *q;
+
+ if (!TRACE_ON())
+ return;
+
+ for (p = buffer->buffer; *p; p = q)
+ {
+ if (!(q = strstr(p, "\n")))
+ q = p + strlen(p);
+ else
+ ++q;
+ vkd3d_dbg_printf(VKD3D_DBG_LEVEL_TRACE, function, "%.*s", (int)(q - p), p);
+ }
+}
+
bool vkd3d_shader_message_context_init(struct vkd3d_shader_message_context *context,
enum vkd3d_shader_log_level log_level, const char *source_name)
{
@@ -116,6 +133,14 @@ void vkd3d_shader_message_context_cleanup(struct vkd3d_shader_message_context *c
vkd3d_string_buffer_cleanup(&context->messages);
}
+#define vkd3d_shader_message_context_trace_messages(context) \
+ vkd3d_shader_message_context_trace_messages_(context, __FUNCTION__)
+static void vkd3d_shader_message_context_trace_messages_(const struct vkd3d_shader_message_context *context,
+ const char *function)
+{
+ vkd3d_string_buffer_trace_(&context->messages, function);
+}
+
static char *vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_context *context)
{
char *messages;
@@ -580,6 +605,7 @@ int vkd3d_shader_scan_dxbc(const struct vkd3d_shader_code *dxbc,
if (!vkd3d_shader_message_context_init(&message_context, VKD3D_SHADER_LOG_INFO, NULL))
return VKD3D_ERROR;
ret = vkd3d_shader_parser_init(&parser, dxbc, &message_context);
+ vkd3d_shader_message_context_trace_messages(&message_context);
if (messages && !(*messages = vkd3d_shader_message_context_copy_messages(&message_context)))
ret = VKD3D_ERROR_OUT_OF_MEMORY;
vkd3d_shader_message_context_cleanup(&message_context);
--
2.11.0
1
0
[PATCH vkd3d 3/5] vkd3d-shader: Trace the shader in vkd3d_shader_scan_dxbc().
by Henri Verbeet July 28, 2020
by Henri Verbeet July 28, 2020
July 28, 2020
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/vkd3d_shader_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index 7548b90..e4f14a7 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -295,9 +295,6 @@ int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info,
vkd3d_shader_dump_shader(parser.shader_version.type, &compile_info->source);
- if (TRACE_ON())
- vkd3d_shader_trace(parser.data);
-
if (!(spirv_compiler = vkd3d_dxbc_compiler_create(&parser.shader_version,
&parser.shader_desc, compile_info, &scan_info)))
{
@@ -589,6 +586,9 @@ int vkd3d_shader_scan_dxbc(const struct vkd3d_shader_code *dxbc,
if (ret < 0)
return ret;
+ if (TRACE_ON())
+ vkd3d_shader_trace(parser.data);
+
memset(scan_info, 0, sizeof(*scan_info));
memset(&context, 0, sizeof(context));
--
2.11.0
1
0
[PATCH vkd3d 2/5] vkd3d-shader: Also copy the terminator in vkd3d_shader_message_context_copy_messages().
by Henri Verbeet July 28, 2020
by Henri Verbeet July 28, 2020
July 28, 2020
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d-shader/vkd3d_shader_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index c7161e4..7548b90 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -120,8 +120,8 @@ static char *vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_mess
{
char *messages;
- if ((messages = vkd3d_malloc(context->messages.content_size)))
- memcpy(messages, context->messages.buffer, context->messages.content_size);
+ if ((messages = vkd3d_malloc(context->messages.content_size + 1)))
+ memcpy(messages, context->messages.buffer, context->messages.content_size + 1);
return messages;
}
--
2.11.0
1
0
[PATCH vkd3d 1/5] vkd3d: Add trailing newlines to error messages in vkd3d_uav_clear_state_init().
by Henri Verbeet July 28, 2020
by Henri Verbeet July 28, 2020
July 28, 2020
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
libs/vkd3d/state.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index 55cb389..316132b 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -2953,14 +2953,14 @@ HRESULT vkd3d_uav_clear_state_init(struct vkd3d_uav_clear_state *state, struct d
if (FAILED(hr = vkd3d_create_descriptor_set_layout(device, 0, 1, &set_binding, set_layouts[i].set_layout)))
{
- ERR("Failed to create descriptor set layout %u, hr %#x.", i, hr);
+ ERR("Failed to create descriptor set layout %u, hr %#x.\n", i, hr);
goto fail;
}
if (FAILED(hr = vkd3d_create_pipeline_layout(device, 1, set_layouts[i].set_layout,
1, &push_constant_range, set_layouts[i].pipeline_layout)))
{
- ERR("Failed to create pipeline layout %u, hr %#x.", i, hr);
+ ERR("Failed to create pipeline layout %u, hr %#x.\n", i, hr);
goto fail;
}
}
@@ -2986,7 +2986,7 @@ HRESULT vkd3d_uav_clear_state_init(struct vkd3d_uav_clear_state *state, struct d
if (FAILED(hr = vkd3d_create_compute_pipeline(device, &pipelines[i].code, &shader_interface,
*pipelines[i].pipeline_layout, pipelines[i].pipeline)))
{
- ERR("Failed to create compute pipeline %u, hr %#x.", i, hr);
+ ERR("Failed to create compute pipeline %u, hr %#x.\n", i, hr);
goto fail;
}
}
--
2.11.0
1
0
[PATCH v2 2/2] wbemprox: Support retrieving more than one object in IEnumWbemClassObject::Next().
by Hans Leidekker July 28, 2020
by Hans Leidekker July 28, 2020
July 28, 2020
From: Gijs Vermeulen <gijsvrm(a)gmail.com>
Patch by GitHub user pnevmoslon with some modifications.
Fixes gamepad support in Mortal Kombat 11.
v2: Release allocated objects on error.
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemprox/class.c | 23 ++++++++++++++---------
dlls/wbemprox/tests/query.c | 12 ++++++------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c
index ba7720b098..db6017e0c9 100644
--- a/dlls/wbemprox/class.c
+++ b/dlls/wbemprox/class.c
@@ -116,24 +116,29 @@ static HRESULT WINAPI enum_class_object_Next(
struct table *table;
static int once = 0;
HRESULT hr;
+ ULONG i, j;
TRACE("%p, %d, %u, %p, %p\n", iface, lTimeout, uCount, apObjects, puReturned);
- if (!uCount) return WBEM_S_FALSE;
if (!apObjects || !puReturned) return WBEM_E_INVALID_PARAMETER;
if (lTimeout != WBEM_INFINITE && !once++) FIXME("timeout not supported\n");
*puReturned = 0;
- if (ec->index >= view->result_count) return WBEM_S_FALSE;
- table = get_view_table( view, ec->index );
- hr = create_class_object( table->name, iface, ec->index, NULL, apObjects );
- if (hr != S_OK) return hr;
+ for (i = 0; i < uCount; i++)
+ {
+ if (ec->index >= view->result_count) return WBEM_S_FALSE;
+ table = get_view_table( view, ec->index );
+ hr = create_class_object( table->name, iface, ec->index, NULL, &apObjects[i] );
+ if (hr != S_OK)
+ {
+ for (j = 0; j < i; j++) IWbemClassObject_Release( apObjects[j] );
+ return hr;
+ }
+ ec->index++;
+ (*puReturned)++;
+ }
- ec->index++;
- *puReturned = 1;
- if (ec->index == view->result_count && uCount > 1) return WBEM_S_FALSE;
- if (uCount > 1) return WBEM_S_TIMEDOUT;
return WBEM_S_NO_ERROR;
}
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index e99e221c30..e48722f3bc 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -181,8 +181,8 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services )
count = 2;
hr = IEnumWbemClassObject_Next( result, 10000, 0, &obj1, &count );
- todo_wine ok( hr == S_OK, "got %08x\n", hr );
- todo_wine ok( count == 0, "expected 0, got %u\n", count );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( count == 0, "expected 0, got %u\n", count );
for (;;)
{
@@ -199,8 +199,8 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services )
count = 0;
hr = IEnumWbemClassObject_Next( result, 10000, num_objects, obj, &count );
- todo_wine ok( hr == S_OK, "got %08x\n", hr );
- todo_wine ok( count == num_objects, "expected %u, got %u\n", num_objects, count );
+ ok( hr == S_OK, "got %08x\n", hr );
+ ok( count == num_objects, "expected %u, got %u\n", num_objects, count );
for (i = 0; i < count; i++)
IWbemClassObject_Release( obj[i] );
@@ -210,8 +210,8 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services )
count = 0;
hr = IEnumWbemClassObject_Next( result, 10000, num_objects + 1, obj, &count );
- todo_wine ok( hr == S_FALSE, "got %08x\n", hr );
- todo_wine ok( count == num_objects, "expected %u, got %u\n", num_objects, count );
+ ok( hr == S_FALSE, "got %08x\n", hr );
+ ok( count == num_objects, "expected %u, got %u\n", num_objects, count );
for (i = 0; i < count; i++)
IWbemClassObject_Release( obj[i] );
--
2.27.0
1
0