Wine-Devel
Threads by month
- ----- 2026 -----
- 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
- 10 participants
- 84519 discussions
[PATCH v2 1/2] win32u: Don't pass physdev to wine_get_wgl_driver() driver function.
by Paul Gofman Feb. 3, 2022
by Paul Gofman Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com>
---
Supersedes 223960.
v2:
- added patch.
Specific GL driver initialization does not depend on anything in the device or context besides making
a decision to call or skip the next driver. Copying the driver constant function pointers out allows
to call driver's _wine_get_wgl_driver outside of any DC lock in the next patch.
dlls/win32u/dibdrv/dc.c | 11 ++++++-----
dlls/win32u/driver.c | 24 +++++++++++++++++++++---
dlls/wineandroid.drv/init.c | 11 ++---------
dlls/winemac.drv/opengl.c | 4 +++-
dlls/winex11.drv/init.c | 11 ++---------
include/wine/gdi_driver.h | 2 +-
6 files changed, 35 insertions(+), 28 deletions(-)
diff --git a/dlls/win32u/dibdrv/dc.c b/dlls/win32u/dibdrv/dc.c
index a96b613d0a3..4cc95e6b843 100644
--- a/dlls/win32u/dibdrv/dc.c
+++ b/dlls/win32u/dibdrv/dc.c
@@ -605,8 +605,10 @@ static struct opengl_funcs opengl_funcs =
/**********************************************************************
* dibdrv_wine_get_wgl_driver
*/
-static struct opengl_funcs * CDECL dibdrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL dibdrv_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
+ *next_funcs = NULL;
+
if (version != WINE_WGL_DRIVER_VERSION)
{
ERR( "version mismatch, opengl32 wants %u but dibdrv has %u\n", version, WINE_WGL_DRIVER_VERSION );
@@ -1177,11 +1179,10 @@ static INT CDECL windrv_StretchDIBits( PHYSDEV dev, INT x_dst, INT y_dst, INT wi
return ret;
}
-static struct opengl_funcs * CDECL windrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL windrv_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
- dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- if (dev->funcs == &dib_driver) dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- return dev->funcs->wine_get_wgl_driver( dev, version );
+ if (*(*next_funcs + 1) == &dib_driver) ++*next_funcs;
+ return NULL;
}
static const struct gdi_dc_funcs window_driver =
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c
index 39996086c6d..f527c6c51cf 100644
--- a/dlls/win32u/driver.c
+++ b/dlls/win32u/driver.c
@@ -579,8 +579,10 @@ static NTSTATUS CDECL nulldrv_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSO
return STATUS_PROCEDURE_NOT_FOUND;
}
-static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
+ *next_funcs = NULL;
+
return (void *)-1;
}
@@ -1347,13 +1349,29 @@ NTSTATUS WINAPI NtGdiDdDDICheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNE
*/
struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version )
{
+ const struct gdi_dc_funcs *driver_funcs[11], **next_funcs;
struct opengl_funcs *ret = NULL;
DC * dc = get_dc_ptr( hdc );
+ PHYSDEV physdev;
if (dc)
{
- PHYSDEV physdev = GET_DC_PHYSDEV( dc, wine_get_wgl_driver );
- ret = physdev->funcs->wine_get_wgl_driver( physdev, version );
+ next_funcs = driver_funcs;
+ physdev = GET_DC_PHYSDEV( dc, wine_get_wgl_driver );
+ while (physdev && next_funcs - driver_funcs < ARRAY_SIZE(driver_funcs) - 1)
+ {
+ *next_funcs++ = physdev->funcs;
+ if (physdev->funcs == &null_driver) break;
+ physdev = GET_NEXT_PHYSDEV( physdev, wine_get_wgl_driver );
+ }
+ *next_funcs = NULL;
+ next_funcs = driver_funcs;
+ while (*next_funcs)
+ {
+ ret = (*next_funcs)->wine_get_wgl_driver( version, &next_funcs );
+ if (ret || !next_funcs) break;
+ ++next_funcs;
+ }
release_dc_ptr( dc );
}
return ret;
diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c
index ed9116eb47e..3c7da3f780f 100644
--- a/dlls/wineandroid.drv/init.c
+++ b/dlls/wineandroid.drv/init.c
@@ -261,16 +261,9 @@ BOOL CDECL ANDROID_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devm
/**********************************************************************
* ANDROID_wine_get_wgl_driver
*/
-static struct opengl_funcs * CDECL ANDROID_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL ANDROID_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
- struct opengl_funcs *ret;
-
- if (!(ret = get_wgl_driver( version )))
- {
- dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- ret = dev->funcs->wine_get_wgl_driver( dev, version );
- }
- return ret;
+ return get_wgl_driver( version );
}
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index daf194c2aec..b5670906e93 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -4632,10 +4632,12 @@ static struct opengl_funcs opengl_funcs =
/**********************************************************************
* macdrv_wine_get_wgl_driver
*/
-struct opengl_funcs * CDECL macdrv_wine_get_wgl_driver(PHYSDEV dev, UINT version)
+struct opengl_funcs * CDECL macdrv_wine_get_wgl_driver(UINT version, const struct gdi_dc_funcs ***next_funcs)
{
static INIT_ONCE opengl_init = INIT_ONCE_STATIC_INIT;
+ *next_funcs = NULL;
+
if (version != WINE_WGL_DRIVER_VERSION)
{
ERR("version mismatch, opengl32 wants %u but macdrv has %u\n", version, WINE_WGL_DRIVER_VERSION);
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 5b31c352a23..ebd221c2d38 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -312,16 +312,9 @@ static INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOI
/**********************************************************************
* X11DRV_wine_get_wgl_driver
*/
-static struct opengl_funcs * CDECL X11DRV_wine_get_wgl_driver( PHYSDEV dev, UINT version )
+static struct opengl_funcs * CDECL X11DRV_wine_get_wgl_driver( UINT version, const struct gdi_dc_funcs ***next_funcs )
{
- struct opengl_funcs *ret;
-
- if (!(ret = get_glx_driver( version )))
- {
- dev = GET_NEXT_PHYSDEV( dev, wine_get_wgl_driver );
- ret = dev->funcs->wine_get_wgl_driver( dev, version );
- }
- return ret;
+ return get_glx_driver( version );
}
/**********************************************************************
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index 567a6c21608..0e3bbade6c4 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -159,7 +159,7 @@ struct gdi_dc_funcs
BOOL (CDECL *pUnrealizePalette)(HPALETTE);
NTSTATUS (CDECL *pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *);
NTSTATUS (CDECL *pD3DKMTSetVidPnSourceOwner)(const D3DKMT_SETVIDPNSOURCEOWNER *);
- struct opengl_funcs * (CDECL *wine_get_wgl_driver)(PHYSDEV,UINT);
+ struct opengl_funcs * (CDECL *wine_get_wgl_driver)(UINT,const struct gdi_dc_funcs ***);
/* priority order for the driver on the stack */
UINT priority;
--
2.34.1
2
4
Feb. 3, 2022
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmusic/tests/Makefile.in | 1 -
dlls/dmusic/tests/dmusic.c | 380 +++++++++++++++++-----------------
2 files changed, 190 insertions(+), 191 deletions(-)
diff --git a/dlls/dmusic/tests/Makefile.in b/dlls/dmusic/tests/Makefile.in
index 091204f16f6..2f8d6a8654c 100644
--- a/dlls/dmusic/tests/Makefile.in
+++ b/dlls/dmusic/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmusic.dll
IMPORTS = oleaut32 ole32 uuid user32 dsound
diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c
index f6b817cca60..d8fc6affd9b 100644
--- a/dlls/dmusic/tests/dmusic.c
+++ b/dlls/dmusic/tests/dmusic.c
@@ -46,7 +46,7 @@ static void test_dmusic(void)
IDirectMusicPort *port = NULL;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic);
- ok(hr == S_OK, "Cannot create DirectMusic object (%x)\n", hr);
+ ok(hr == S_OK, "Cannot create DirectMusic object: %#lx\n", hr);
port_params.dwSize = sizeof(port_params);
port_params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS;
@@ -55,39 +55,39 @@ static void test_dmusic(void)
/* No port can be created before SetDirectSound is called */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL);
- ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == DMUS_E_DSOUND_NOT_SET, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
- ok(hr == S_OK, "IDirectMusic_SetDirectSound returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_SetDirectSound returned: %#lx\n", hr);
/* Check wrong params */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, (IUnknown*)dmusic);
- ok(hr == CLASS_E_NOAGGREGATION, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == CLASS_E_NOAGGREGATION, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, NULL, &port_params, &port, NULL);
- ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, NULL, &port, NULL);
- ok(hr == E_INVALIDARG, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == E_INVALIDARG, "IDirectMusic_CreatePort returned: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, NULL, NULL);
- ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusic_CreatePort returned: %#lx\n", hr);
/* Test creation of default port with GUID_NULL */
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, &port_params, &port, NULL);
- ok(hr == S_OK, "IDirectMusic_CreatePort returned: %x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreatePort returned: %#lx\n", hr);
port_caps.dwSize = sizeof(port_caps);
while (IDirectMusic_EnumPort(dmusic, index, &port_caps) == S_OK)
{
- ok(port_caps.dwSize == sizeof(port_caps), "DMUS_PORTCAPS dwSize member is wrong (%u)\n", port_caps.dwSize);
- trace("Port %u:\n", index);
- trace(" dwFlags = %x\n", port_caps.dwFlags);
+ ok(port_caps.dwSize == sizeof(port_caps), "DMUS_PORTCAPS dwSize member is wrong (%lu)\n", port_caps.dwSize);
+ trace("Port %lu:\n", index);
+ trace(" dwFlags = %lx\n", port_caps.dwFlags);
trace(" guidPort = %s\n", wine_dbgstr_guid(&port_caps.guidPort));
- trace(" dwClass = %u\n", port_caps.dwClass);
- trace(" dwType = %u\n", port_caps.dwType);
- trace(" dwMemorySize = %u\n", port_caps.dwMemorySize);
- trace(" dwMaxChannelGroups = %u\n", port_caps.dwMaxChannelGroups);
- trace(" dwMaxVoices = %u\n", port_caps.dwMaxVoices);
- trace(" dwMaxAudioChannels = %u\n", port_caps.dwMaxAudioChannels);
- trace(" dwEffectFlags = %x\n", port_caps.dwEffectFlags);
+ trace(" dwClass = %lu\n", port_caps.dwClass);
+ trace(" dwType = %lu\n", port_caps.dwType);
+ trace(" dwMemorySize = %lu\n", port_caps.dwMemorySize);
+ trace(" dwMaxChannelGroups = %lu\n", port_caps.dwMaxChannelGroups);
+ trace(" dwMaxVoices = %lu\n", port_caps.dwMaxVoices);
+ trace(" dwMaxAudioChannels = %lu\n", port_caps.dwMaxAudioChannels);
+ trace(" dwEffectFlags = %lx\n", port_caps.dwEffectFlags);
trace(" wszDescription = %s\n", wine_dbgstr_w(port_caps.wszDescription));
index++;
}
@@ -123,14 +123,14 @@ static void test_setdsound(void)
skip("No driver\n");
return;
}
- ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
(void **)&dmusic);
- ok(hr == S_OK, "DirectMusic create failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectMusic create failed: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, ¶ms, &port, NULL);
- ok(hr == S_OK, "CreatePort returned: %x\n", hr);
+ ok(hr == S_OK, "CreatePort returned: %#lx\n", hr);
IDirectMusicPort_Release(port);
IDirectMusic_Release(dmusic);
IDirectSound_Release(dsound);
@@ -138,103 +138,103 @@ static void test_setdsound(void)
/* dsound ref counting */
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
(void **)&dmusic);
- ok(hr == S_OK, "DirectMusic create failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectMusic create failed: %#lx\n", hr);
hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&dsound, NULL);
- ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = IDirectSound_SetCooperativeLevel(dsound, GetForegroundWindow(), DSSCL_PRIORITY);
- ok(hr == S_OK, "SetCooperativeLevel failed: %08x\n", hr);
+ ok(hr == S_OK, "SetCooperativeLevel failed: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusic_CreatePort(dmusic, &GUID_NULL, ¶ms, &port, NULL);
- ok(hr == S_OK, "CreatePort returned: %x\n", hr);
+ ok(hr == S_OK, "CreatePort returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
IDirectMusicPort_AddRef(port);
ref = IDirectMusicPort_Release(port);
- ok(ref == 1, "port ref count got %d expected 1\n", ref);
+ ok(ref == 1, "port ref count got %ld expected 1\n", ref);
hr = IDirectMusicPort_Activate(port, TRUE);
- ok(hr == S_OK, "Port Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 4, "dsound ref count got %d expected 4\n", ref);
+ ok(ref == 4, "dsound ref count got %ld expected 4\n", ref);
IDirectMusicPort_AddRef(port);
ref = IDirectMusicPort_Release(port);
- ok(ref == 1, "port ref count got %d expected 1\n", ref);
+ ok(ref == 1, "port ref count got %ld expected 1\n", ref);
/* Releasing dsound from dmusic */
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
- ok(hr == DMUS_E_DSOUND_ALREADY_SET, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == DMUS_E_DSOUND_ALREADY_SET, "SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusicPort_Activate(port, FALSE);
- ok(hr == S_OK, "Port Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusic_SetDirectSound(dmusic, NULL, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 1, "dsound ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound ref count got %ld expected 1\n", ref);
/* Setting the same dsound twice */
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
/* Replacing one dsound with another */
hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&dsound2, NULL);
- ok(hr == S_OK, "DirectSoundCreate failed: %08x\n", hr);
+ ok(hr == S_OK, "DirectSoundCreate failed: %#lx\n", hr);
hr = IDirectMusic_SetDirectSound(dmusic, dsound2, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 1, "dsound ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound ref count got %ld expected 1\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
/* Replacing the dsound in the port */
hr = IDirectMusicPort_SetDirectSound(port, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 2, "dsound ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound ref count got %ld expected 2\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
/* Setting the dsound again on the port will mess with the parent dmusic */
hr = IDirectMusicPort_SetDirectSound(port, dsound, NULL);
- ok(hr == S_OK, "SetDirectSound failed: %08x\n", hr);
+ ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 1, "dsound2 ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound2 ref count got %ld expected 1\n", ref);
IDirectSound_AddRef(dsound2); /* Crash prevention */
hr = IDirectMusicPort_Activate(port, TRUE);
- ok(hr == S_OK, "Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 4, "dsound ref count got %d expected 4\n", ref);
+ ok(ref == 4, "dsound ref count got %ld expected 4\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
hr = IDirectMusicPort_Activate(port, TRUE);
- ok(hr == S_FALSE, "Activate returned: %x\n", hr);
+ ok(hr == S_FALSE, "Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 4, "dsound ref count got %d expected 4\n", ref);
+ ok(ref == 4, "dsound ref count got %ld expected 4\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 2, "dsound2 ref count got %d expected 2\n", ref);
+ ok(ref == 2, "dsound2 ref count got %ld expected 2\n", ref);
/* Deactivating the port messes with the dsound refcount in the parent dmusic */
hr = IDirectMusicPort_Activate(port, FALSE);
- ok(hr == S_OK, "Port Activate returned: %x\n", hr);
+ ok(hr == S_OK, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 1, "dsound2 ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound2 ref count got %ld expected 1\n", ref);
hr = IDirectMusicPort_Activate(port, FALSE);
- ok(hr == S_FALSE, "Port Activate returned: %x\n", hr);
+ ok(hr == S_FALSE, "Port Activate returned: %#lx\n", hr);
ref = get_refcount(dsound);
- ok(ref == 3, "dsound ref count got %d expected 3\n", ref);
+ ok(ref == 3, "dsound ref count got %ld expected 3\n", ref);
ref = get_refcount(dsound2);
- ok(ref == 1, "dsound2 ref count got %d expected 1\n", ref);
+ ok(ref == 1, "dsound2 ref count got %ld expected 1\n", ref);
IDirectMusicPort_Release(port);
IDirectMusic_Release(dmusic);
@@ -254,7 +254,7 @@ static void test_dmbuffer(void)
LPBYTE data;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (LPVOID*)&dmusic);
- ok(hr == S_OK, "Cannot create DirectMusic object (%x)\n", hr);
+ ok(hr == S_OK, "Cannot create DirectMusic object: %#lx\n", hr);
desc.dwSize = sizeof(DMUS_BUFFERDESC);
desc.dwFlags = 0;
@@ -262,43 +262,43 @@ static void test_dmbuffer(void)
memcpy(&desc.guidBufferFormat, &GUID_NULL, sizeof(GUID));
hr = IDirectMusic_CreateMusicBuffer(dmusic, &desc, &dmbuffer, NULL);
- ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer return %x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetBufferFormat(dmbuffer, &format);
- ok(hr == S_OK, "IDirectMusicBuffer_GetBufferFormat returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetBufferFormat returned %#lx\n", hr);
ok(IsEqualGUID(&format, &KSDATAFORMAT_SUBTYPE_MIDI), "Wrong format returned %s\n", wine_dbgstr_guid(&format));
hr = IDirectMusicBuffer_GetMaxBytes(dmbuffer, &size);
- ok(hr == S_OK, "IDirectMusicBuffer_GetMaxBytes returned %x\n", hr);
- ok(size == 1024, "Buffer size is %u instead of 1024\n", size);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetMaxBytes returned %#lx\n", hr);
+ ok(size == 1024, "Buffer size is %lu instead of 1024\n", size);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_SetStartTime(dmbuffer, 10);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == DMUS_E_BUFFER_EMPTY, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_PackStructured(dmbuffer, 20, 0, 0);
- ok(hr == DMUS_E_INVALID_EVENT, "IDirectMusicBuffer_PackStructured returned %x\n", hr);
+ ok(hr == DMUS_E_INVALID_EVENT, "IDirectMusicBuffer_PackStructured returned %#lx\n", hr);
hr = IDirectMusicBuffer_PackStructured(dmbuffer, 20, 0, 0x000090); /* note on : chan 0, note 0 & vel 0 */
- ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %#lx\n", hr);
hr = IDirectMusicBuffer_PackStructured(dmbuffer, 30, 0, 0x000080); /* note off : chan 0, note 0 & vel 0 */
- ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_PackStructured returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetUsedBytes(dmbuffer, &bytes);
- ok(hr == S_OK, "IDirectMusicBuffer_GetUsedBytes returned %x\n", hr);
- ok(bytes == 48, "Buffer size is %u instead of 48\n", bytes);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetUsedBytes returned %#lx\n", hr);
+ ok(bytes == 48, "Buffer size is %lu instead of 48\n", bytes);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
ok(time == 20, "Buffer start time is wrong\n");
hr = IDirectMusicBuffer_SetStartTime(dmbuffer, 40);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
hr = IDirectMusicBuffer_GetStartTime(dmbuffer, &time);
- ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetStartTime returned %#lx\n", hr);
ok(time == 40, "Buffer start time is wrong\n");
hr = IDirectMusicBuffer_GetRawBufferPtr(dmbuffer, &data);
- ok(hr == S_OK, "IDirectMusicBuffer_GetRawBufferPtr returned %x\n", hr);
+ ok(hr == S_OK, "IDirectMusicBuffer_GetRawBufferPtr returned %#lx\n", hr);
if (hr == S_OK)
{
DMUS_EVENTHEADER* header;
@@ -307,23 +307,23 @@ static void test_dmbuffer(void)
/* Check message 1 */
header = (DMUS_EVENTHEADER*)data;
data += sizeof(DMUS_EVENTHEADER);
- ok(header->cbEvent == 3, "cbEvent is %u instead of 3\n", header->cbEvent);
- ok(header->dwChannelGroup == 0, "dwChannelGroup is %u instead of 0\n", header->dwChannelGroup);
+ ok(header->cbEvent == 3, "cbEvent is %lu instead of 3\n", header->cbEvent);
+ ok(header->dwChannelGroup == 0, "dwChannelGroup is %lu instead of 0\n", header->dwChannelGroup);
ok(header->rtDelta == 0, "rtDelta is %s instead of 0\n", wine_dbgstr_longlong(header->rtDelta));
- ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %x instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
+ ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %lx instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
message = *(DWORD*)data & 0xffffff; /* Only 3 bytes are relevant */
data += sizeof(DWORD);
- ok(message == 0x000090, "Message is %0x instead of 0x000090\n", message);
+ ok(message == 0x000090, "Message is %0lx instead of 0x000090\n", message);
/* Check message 2 */
header = (DMUS_EVENTHEADER*)data;
data += sizeof(DMUS_EVENTHEADER);
- ok(header->cbEvent == 3, "cbEvent is %u instead of 3\n", header->cbEvent);
- ok(header->dwChannelGroup == 0, "dwChannelGroup is %u instead of 0\n", header->dwChannelGroup);
+ ok(header->cbEvent == 3, "cbEvent is %lu instead of 3\n", header->cbEvent);
+ ok(header->dwChannelGroup == 0, "dwChannelGroup is %lu instead of 0\n", header->dwChannelGroup);
ok(header->rtDelta == 10, "rtDelta is %s instead of 0\n", wine_dbgstr_longlong(header->rtDelta));
- ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %x instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
+ ok(header->dwFlags == DMUS_EVENT_STRUCTURED, "dwFlags is %lx instead of %x\n", header->dwFlags, DMUS_EVENT_STRUCTURED);
message = *(DWORD*)data & 0xffffff; /* Only 3 bytes are relevant */
- ok(message == 0x000080, "Message 2 is %0x instead of 0x000080\n", message);
+ ok(message == 0x000080, "Message 2 is %0lx instead of 0x000080\n", message);
}
if (dmbuffer)
@@ -343,13 +343,13 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusic, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER, &IID_IUnknown,
(void**)&dm8);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusic8 create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusic8 create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dm8, "dm8 = %p\n", dm8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void**)&dm8);
- ok(hr == E_NOINTERFACE, "DirectMusic8 create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusic8 create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for DirectMusic and DirectMusic8 */
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
@@ -359,23 +359,23 @@ static void test_COM(void)
win_skip("DirectMusic too old (no IDirectMusic8)\n");
return;
}
- ok(hr == S_OK, "DirectMusic8 create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusic8 create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusic8_AddRef(dm8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusic8_QueryInterface(dm8, &IID_IDirectMusic, (void**)&dm);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusic failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusic failed: %#lx\n", hr);
refcount = IDirectMusic_AddRef(dm);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IDirectMusic_Release(dm);
hr = IDirectMusic8_QueryInterface(dm8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
while (IDirectMusic8_Release(dm8));
}
@@ -392,40 +392,40 @@ static void test_COM_dmcoll(void)
hr = CoCreateInstance(&CLSID_DirectMusicCollection, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmc);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicCollection create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicCollection create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmc, "dmc = %p\n", dmc);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IClassFactory, (void**)&dmc);
- ok(hr == E_NOINTERFACE, "DirectMusicCollection create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicCollection create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicCollection interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicCollection, (void**)&dmc);
- ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicCollection create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicCollection_AddRef(dmc);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
while (IDirectMusicCollection_Release(dmc));
}
@@ -441,45 +441,45 @@ static void test_dmcoll(void)
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicCollection, (void**)&dmc);
- ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicCollection create failed: %#lx, expected S_OK\n", hr);
/* IDirectMusicObject */
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
hr = IDirectMusicObject_GetDescriptor(dmo, NULL);
- ok(hr == E_POINTER, "IDirectMusicObject_GetDescriptor: expected E_POINTER, got %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicObject_GetDescriptor: expected E_POINTER, got %#lx\n", hr);
hr = IDirectMusicObject_SetDescriptor(dmo, NULL);
- ok(hr == E_POINTER, "IDirectMusicObject_SetDescriptor: expected E_POINTER, got %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicObject_SetDescriptor: expected E_POINTER, got %#lx\n", hr);
ZeroMemory(&desc, sizeof(desc));
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr);
+ ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %#lx\n", hr);
ok(desc.dwValidData == DMUS_OBJ_CLASS,
- "Fresh object has more valid data (%08x) than DMUS_OBJ_CLASS\n", desc.dwValidData);
+ "Fresh object has more valid data (%#lx) than DMUS_OBJ_CLASS\n", desc.dwValidData);
/* DMUS_OBJ_CLASS is immutable */
desc.dwValidData = DMUS_OBJ_CLASS;
hr = IDirectMusicObject_SetDescriptor(dmo, &desc);
- ok(hr == S_FALSE , "IDirectMusicObject_SetDescriptor failed: %08x\n", hr);
- ok(!desc.dwValidData, "dwValidData wasn't cleared: %08x\n", desc.dwValidData);
+ ok(hr == S_FALSE , "IDirectMusicObject_SetDescriptor failed: %#lx\n", hr);
+ ok(!desc.dwValidData, "dwValidData wasn't cleared: %#lx\n", desc.dwValidData);
desc.dwValidData = DMUS_OBJ_CLASS;
desc.guidClass = CLSID_DirectMusicSegment;
hr = IDirectMusicObject_SetDescriptor(dmo, &desc);
- ok(hr == S_FALSE && !desc.dwValidData, "IDirectMusicObject_SetDescriptor failed: %08x\n", hr);
+ ok(hr == S_FALSE && !desc.dwValidData, "IDirectMusicObject_SetDescriptor failed: %#lx\n", hr);
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %08x\n", hr);
+ ok(hr == S_OK, "IDirectMusicObject_GetDescriptor failed: %#lx\n", hr);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"guidClass changed, should be CLSID_DirectMusicCollection\n");
/* Unimplemented IPersistStream methods*/
hr = IDirectMusicCollection_QueryInterface(dmc, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %#lx\n", hr);
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicCollection_Release(dmc));
}
@@ -505,16 +505,16 @@ static IDirectMusicPort *create_synth_port(IDirectMusic **dmusic)
HRESULT hr;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (void **)dmusic);
- ok(hr == S_OK, "Cannot create DirectMusic object: %#x\n", hr);
+ ok(hr == S_OK, "Cannot create DirectMusic object: %#lx\n", hr);
params.dwSize = sizeof(params);
params.dwValidParams = DMUS_PORTPARAMS_CHANNELGROUPS | DMUS_PORTPARAMS_AUDIOCHANNELS;
params.dwChannelGroups = 1;
params.dwAudioChannels = 2;
hr = IDirectMusic_SetDirectSound(*dmusic, NULL, NULL);
- ok(hr == S_OK, "IDirectMusic_SetDirectSound failed: %#x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_SetDirectSound failed: %#lx\n", hr);
hr = IDirectMusic_CreatePort(*dmusic, &GUID_NULL, ¶ms, &port, NULL);
- ok(hr == S_OK, "IDirectMusic_CreatePort failed: %#x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreatePort failed: %#lx\n", hr);
return port;
}
@@ -535,35 +535,35 @@ static void test_COM_synthport(void)
/* Same refcount for all DirectMusicPort interfaces */
refcount = IDirectMusicPort_AddRef(port);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicPort_QueryInterface(port, &IID_IDirectMusicPortDownload, (void**)&dmpd);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPortDownload failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicPortDownload failed: %#lx\n", hr);
refcount = IDirectMusicPortDownload_AddRef(dmpd);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IDirectMusicPortDownload_Release(dmpd);
hr = IDirectMusicPort_QueryInterface(port, &IID_IKsControl, (void**)&iksc);
- ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IKsControl failed: %#lx\n", hr);
refcount = IKsControl_AddRef(iksc);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
IKsControl_Release(iksc);
hr = IDirectMusicPort_QueryInterface(port, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
IUnknown_Release(unk);
/* Unsupported interface */
hr = IDirectMusicPort_QueryInterface(port, &IID_IDirectMusicThru, (void**)&dmt);
- todo_wine ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicThru failed: %08x\n", hr);
+ todo_wine ok(hr == E_NOINTERFACE, "QueryInterface for IID_IDirectMusicThru failed: %#lx\n", hr);
hr = IDirectMusicPort_QueryInterface(port, &IID_IReferenceClock, (void**)&clock);
- ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "QueryInterface for IID_IReferenceClock failed: %#lx\n", hr);
while (IDirectMusicPort_Release(port));
refcount = IDirectMusic_Release(dmusic);
- ok(!refcount, "Got outstanding refcount %d.\n", refcount);
+ ok(!refcount, "Got outstanding refcount %ld.\n", refcount);
}
struct chunk {
@@ -679,12 +679,12 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicCollection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo);
- ok(hr == S_OK, "DirectMusicCollection create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicCollection create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_OBJECT\n",
+ ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_OBJECT\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"Got class guid %s, expected CLSID_DirectMusicCollection\n",
@@ -694,8 +694,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"Got class guid %s, expected CLSID_DirectMusicCollection\n",
@@ -705,31 +705,31 @@ static void test_parsedescriptor(void)
/* NULL pointers */
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
/* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == DMUS_E_NOTADLSCOL, "ParseDescriptor failed: %08x, expected DMUS_E_NOTADLSCOL\n", hr);
+ ok(hr == DMUS_E_NOTADLSCOL, "ParseDescriptor failed: %#lx, expected DMUS_E_NOTADLSCOL\n", hr);
IStream_Release(stream);
/* All desc chunks */
stream = gen_riff_stream(alldesc);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_VERSION),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_VERSION\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_VERSION\n", desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicCollection),
"Got class guid %s, expected CLSID_DirectMusicCollection\n",
wine_dbgstr_guid(&desc.guidClass));
ok(IsEqualGUID(&desc.guidObject, &GUID_NULL), "Got object guid %s, expected GUID_NULL\n",
wine_dbgstr_guid(&desc.guidClass));
ok(desc.vVersion.dwVersionMS == 5 && desc.vVersion.dwVersionLS == 8,
- "Got version %u.%u, expected 5.8\n", desc.vVersion.dwVersionMS,
+ "Got version %lu.%lu, expected 5.8\n", desc.vVersion.dwVersionMS,
desc.vVersion.dwVersionLS);
IStream_Release(stream);
@@ -738,8 +738,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
@@ -748,9 +748,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
@@ -759,9 +759,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(dupes);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME | DMUS_OBJ_VERSION),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME | DMUS_OBJ_VERSION\n",
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME | DMUS_OBJ_VERSION\n",
desc.dwValidData);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
@@ -785,29 +785,29 @@ static void test_master_clock(void)
GUID guid;
hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic, (void **)&dmusic);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectMusic_GetMasterClock(dmusic, NULL, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&guid, 0xcc, sizeof(guid));
hr = IDirectMusic_GetMasterClock(dmusic, &guid, NULL);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
todo_wine ok(IsEqualGUID(&guid, &guid_system_clock), "Got guid %s.\n", wine_dbgstr_guid(&guid));
clock = (IReferenceClock *)0xdeadbeef;
hr = IDirectMusic_GetMasterClock(dmusic, NULL, &clock);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock && clock != (IReferenceClock *)0xdeadbeef, "Got clock %p.\n", clock);
hr = IDirectMusic_GetMasterClock(dmusic, NULL, &clock2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock2 == clock, "Clocks didn't match.\n");
IReferenceClock_Release(clock2);
memset(&guid, 0xcc, sizeof(guid));
hr = IDirectMusic_GetMasterClock(dmusic, &guid, &clock2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
todo_wine ok(IsEqualGUID(&guid, &guid_system_clock), "Got guid %s.\n", wine_dbgstr_guid(&guid));
ok(clock2 == clock, "Clocks didn't match.\n");
IReferenceClock_Release(clock2);
@@ -815,59 +815,59 @@ static void test_master_clock(void)
QueryPerformanceFrequency(&freq);
QueryPerformanceCounter(&counter);
hr = IReferenceClock_GetTime(clock, &time1);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
time2 = counter.QuadPart * 10000000.0 / freq.QuadPart;
ok(compare_time(time1, time2, 20 * 10000), "Expected about %s, got %s.\n",
wine_dbgstr_longlong(time2), wine_dbgstr_longlong(time1));
hr = IReferenceClock_GetTime(clock, &time2);
- ok(hr == (time2 == time1 ? S_FALSE : S_OK), "Got hr %#x.\n", hr);
+ ok(hr == (time2 == time1 ? S_FALSE : S_OK), "Got hr %#lx.\n", hr);
Sleep(100);
hr = IReferenceClock_GetTime(clock, &time2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n",
wine_dbgstr_longlong(time1 + 100 * 10000), wine_dbgstr_longlong(time2));
hr = IReferenceClock_AdviseTime(clock, 0, 0, NULL, &cookie);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, 0, 0, NULL, &cookie);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IReferenceClock_Unadvise(clock, 0);
- ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr);
+ ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IReferenceClock_Release(clock);
hr = IDirectMusic_EnumMasterClock(dmusic, 0, NULL);
- todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
memset(&clock_info, 0xcc, sizeof(DMUS_CLOCKINFO));
clock_info.dwSize = sizeof(DMUS_CLOCKINFO7);
hr = IDirectMusic_EnumMasterClock(dmusic, 0, &clock_info);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock_info.ctType == DMUS_CLOCK_SYSTEM, "Got type %#x.\n", clock_info.ctType);
ok(IsEqualGUID(&clock_info.guidClock, &guid_system_clock), "Got guid %s.\n",
wine_dbgstr_guid(&clock_info.guidClock));
- ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#x.\n", clock_info.dwFlags);
+ ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#lx.\n", clock_info.dwFlags);
memset(&clock_info, 0xcc, sizeof(DMUS_CLOCKINFO));
clock_info.dwSize = sizeof(DMUS_CLOCKINFO7);
hr = IDirectMusic_EnumMasterClock(dmusic, 1, &clock_info);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(clock_info.ctType == DMUS_CLOCK_SYSTEM, "Got type %#x.\n", clock_info.ctType);
ok(IsEqualGUID(&clock_info.guidClock, &guid_dsound_clock), "Got guid %s.\n",
wine_dbgstr_guid(&clock_info.guidClock));
- ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#x.\n", clock_info.dwFlags);
+ ok(clock_info.dwFlags == 0xcccccccc, "Got flags %#lx.\n", clock_info.dwFlags);
memset(&clock_info, 0xcc, sizeof(DMUS_CLOCKINFO));
clock_info.dwSize = sizeof(DMUS_CLOCKINFO7);
hr = IDirectMusic_EnumMasterClock(dmusic, 2, &clock_info);
- ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ref = IDirectMusic_Release(dmusic);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ok(!ref, "Got outstanding refcount %ld.\n", ref);
}
static void test_synthport(void)
@@ -887,39 +887,39 @@ static void test_synthport(void)
desc.cbBuffer = 1023;
memcpy(&desc.guidBufferFormat, &GUID_NULL, sizeof(GUID));
hr = IDirectMusic_CreateMusicBuffer(dmusic, &desc, &buf, NULL);
- ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer failed: %#x\n", hr);
+ ok(hr == S_OK, "IDirectMusic_CreateMusicBuffer failed: %#lx\n", hr);
/* Unsupported methods */
hr = IDirectMusicPort_Read(port, NULL);
- todo_wine ok(hr == E_POINTER, "Read returned: %#x\n", hr);
+ todo_wine ok(hr == E_POINTER, "Read returned: %#lx\n", hr);
hr = IDirectMusicPort_Read(port, buf);
- ok(hr == E_NOTIMPL, "Read returned: %#x\n", hr);
+ ok(hr == E_NOTIMPL, "Read returned: %#lx\n", hr);
hr = IDirectMusicPort_SetReadNotificationHandle(port, NULL);
- ok(hr == E_NOTIMPL, "SetReadNotificationHandle returned: %#x\n", hr);
+ ok(hr == E_NOTIMPL, "SetReadNotificationHandle returned: %#lx\n", hr);
hr = IDirectMusicPort_Compact(port);
- ok(hr == E_NOTIMPL, "Compact returned: %#x\n", hr);
+ ok(hr == E_NOTIMPL, "Compact returned: %#lx\n", hr);
/* GetCaps */
hr = IDirectMusicPort_GetCaps(port, NULL);
- ok(hr == E_INVALIDARG, "GetCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetCaps failed: %#lx\n", hr);
memset(&caps, 0, sizeof(caps));
hr = IDirectMusicPort_GetCaps(port, &caps);
- ok(hr == E_INVALIDARG, "GetCaps failed: %#x\n", hr);
+ ok(hr == E_INVALIDARG, "GetCaps failed: %#lx\n", hr);
caps.dwSize = sizeof(caps);
hr = IDirectMusicPort_GetCaps(port, &caps);
- ok(hr == S_OK, "GetCaps failed: %#x\n", hr);
- ok(caps.dwSize == sizeof(caps), "dwSize was modified to %d\n", caps.dwSize);
+ ok(hr == S_OK, "GetCaps failed: %#lx\n", hr);
+ ok(caps.dwSize == sizeof(caps), "dwSize was modified to %ld\n", caps.dwSize);
ok(IsEqualGUID(&caps.guidPort, &CLSID_DirectMusicSynth), "Expected port guid CLSID_DirectMusicSynth, got %s\n",
wine_dbgstr_guid(&caps.guidPort));
- ok(caps.dwClass == DMUS_PC_OUTPUTCLASS, "Got wrong dwClass: %#x\n", caps.dwClass);
- ok(caps.dwType == DMUS_PORT_USER_MODE_SYNTH, "Got wrong dwType: %#x\n", caps.dwType);
+ ok(caps.dwClass == DMUS_PC_OUTPUTCLASS, "Got wrong dwClass: %#lx\n", caps.dwClass);
+ ok(caps.dwType == DMUS_PORT_USER_MODE_SYNTH, "Got wrong dwType: %#lx\n", caps.dwType);
ok(caps.dwFlags == (DMUS_PC_AUDIOPATH|DMUS_PC_DIRECTSOUND|DMUS_PC_DLS|DMUS_PC_DLS2|DMUS_PC_SOFTWARESYNTH|
- DMUS_PC_WAVE), "Unexpected dwFlags returned: %#x\n", caps.dwFlags);
- ok(caps.dwMemorySize == DMUS_PC_SYSTEMMEMORY, "Got dwMemorySize: %#x\n", caps.dwMemorySize);
- ok(caps.dwMaxChannelGroups == 1000, "Got dwMaxChannelGroups: %d\n", caps.dwMaxChannelGroups);
- ok(caps.dwMaxVoices == 1000, "Got dwMaxVoices: %d\n", caps.dwMaxVoices);
- ok(caps.dwMaxAudioChannels == 2, "Got dwMaxAudioChannels: %#x\n", caps.dwMaxAudioChannels);
- ok(caps.dwEffectFlags == DMUS_EFFECT_REVERB, "Unexpected dwEffectFlags returned: %#x\n", caps.dwEffectFlags);
+ DMUS_PC_WAVE), "Unexpected dwFlags returned: %#lx\n", caps.dwFlags);
+ ok(caps.dwMemorySize == DMUS_PC_SYSTEMMEMORY, "Got dwMemorySize: %#lx\n", caps.dwMemorySize);
+ ok(caps.dwMaxChannelGroups == 1000, "Got dwMaxChannelGroups: %ld\n", caps.dwMaxChannelGroups);
+ ok(caps.dwMaxVoices == 1000, "Got dwMaxVoices: %ld\n", caps.dwMaxVoices);
+ ok(caps.dwMaxAudioChannels == 2, "Got dwMaxAudioChannels: %#lx\n", caps.dwMaxAudioChannels);
+ ok(caps.dwEffectFlags == DMUS_EFFECT_REVERB, "Unexpected dwEffectFlags returned: %#lx\n", caps.dwEffectFlags);
trace("Port wszDescription: %s\n", wine_dbgstr_w(caps.wszDescription));
IDirectMusicPort_Release(port);
--
2.34.1
1
0
[PATCH] winegcc: --out-implib needs to propagate -m32/-m64 to winebuild.
by Kevin Puetz Feb. 3, 2022
by Kevin Puetz Feb. 3, 2022
Feb. 3, 2022
This was already passed through for linking, and for spec.o files,
but was overlooked when implementing -Wl,--out-implib
Signed-off-by: Kevin Puetz <PuetzKevinA(a)JohnDeere.com>
---
tools/winegcc/winegcc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 0aafca1271a..aa8c63f5457 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1408,6 +1408,8 @@ static void build(struct options* opts)
strarray_add( &implib_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " )));
tool = build_tool_name( opts, TOOL_LD );
strarray_add( &implib_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " )));
+ if (opts->force_pointer_size)
+ strarray_add(&implib_args, strmake("-m%u", 8 * opts->force_pointer_size ));
strarray_add(&implib_args, "--implib");
strarray_add(&implib_args, "-o");
--
2.34.1
2
2
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/Makefile.in | 1 -
dlls/d2d1/tests/d2d1.c | 1341 +++++++++++++++++------------------
2 files changed, 666 insertions(+), 676 deletions(-)
diff --git a/dlls/d2d1/tests/Makefile.in b/dlls/d2d1/tests/Makefile.in
index cd8701395b2e..5eeb815e07fb 100644
--- a/dlls/d2d1/tests/Makefile.in
+++ b/dlls/d2d1/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d2d1.dll
IMPORTS = d2d1 d3d10_1 d3d11 dwrite dxguid uuid user32 advapi32 ole32 gdi32
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 003aad605054..2ac48e026c32 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -343,12 +343,12 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
HRESULT hr;
hr = IDXGISurface_GetDevice(surface, &IID_ID3D10Device, (void **)&device);
- ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Resource, (void **)&src_resource);
- ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_GetDesc(surface, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = surface_desc.Width;
texture_desc.Height = surface_desc.Height;
texture_desc.MipLevels = 1;
@@ -360,7 +360,7 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
texture_desc.CPUAccessFlags = D3D10_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D10Texture2D **)&rb->u.d3d10_resource);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
@@ -370,7 +370,7 @@ static void get_d3d10_surface_readback(IDXGISurface *surface, struct resource_re
ID3D10Device_Release(device);
hr = ID3D10Texture2D_Map((ID3D10Texture2D *)rb->u.d3d10_resource, 0, D3D10_MAP_READ, 0, &map_desc);
- ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->pitch = map_desc.RowPitch;
rb->data = map_desc.pData;
@@ -387,12 +387,12 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
HRESULT hr;
hr = IDXGISurface_GetDevice(surface, &IID_ID3D11Device, (void **)&device);
- ok(SUCCEEDED(hr), "Failed to get device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D11Resource, (void **)&src_resource);
- ok(SUCCEEDED(hr), "Failed to query resource interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface_GetDesc(surface, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
texture_desc.Width = surface_desc.Width;
texture_desc.Height = surface_desc.Height;
texture_desc.MipLevels = 1;
@@ -404,7 +404,7 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
texture_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
texture_desc.MiscFlags = 0;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D11Texture2D **)&rb->u.d3d11_resource);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
rb->width = texture_desc.Width;
rb->height = texture_desc.Height;
@@ -415,7 +415,7 @@ static void get_d3d11_surface_readback(IDXGISurface *surface, struct resource_re
ID3D11Device_Release(device);
hr = ID3D11DeviceContext_Map(context, rb->u.d3d11_resource, 0, D3D11_MAP_READ, 0, &map_desc);
- ok(SUCCEEDED(hr), "Failed to map texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D11DeviceContext_Release(context);
rb->pitch = map_desc.RowPitch;
@@ -556,7 +556,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
hash_size = sizeof(hash_data);
ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
ok(ret, "Failed to get hash value.\n");
- ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
+ ok(hash_size == sizeof(hash_data), "Got unexpected hash size %lu.\n", hash_size);
ret = CryptDestroyHash(hash);
ok(ret, "Failed to destroy hash.\n");
@@ -594,16 +594,16 @@ static BOOL compare_wic_bitmap(IWICBitmap *bitmap, const char *ref_sha1)
BOOL ret;
hr = IWICBitmap_Lock(bitmap, NULL, WICBitmapLockRead, &lock);
- ok(SUCCEEDED(hr), "Failed to lock bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetDataPointer(lock, &buffer_size, &data);
- ok(SUCCEEDED(hr), "Failed to get bitmap data, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetStride(lock, &stride);
- ok(SUCCEEDED(hr), "Failed to get bitmap stride, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICBitmapLock_GetSize(lock, &width, &height);
- ok(SUCCEEDED(hr), "Failed to get bitmap size, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = compare_sha1(data, stride, 4, width, height, ref_sha1);
@@ -862,7 +862,7 @@ static IDXGIDevice *create_device(BOOL d3d11)
ID3D10Device1_Release(d3d10_device);
}
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
return device;
}
@@ -886,9 +886,9 @@ static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL w
HRESULT hr;
hr = IDXGIDevice_GetAdapter(device, &adapter);
- ok(SUCCEEDED(hr), "Failed to get adapter, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to get factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIAdapter_Release(adapter);
desc.BufferDesc.Width = 640;
@@ -908,7 +908,7 @@ static IDXGISwapChain *create_swapchain(IDXGIDevice *device, HWND window, BOOL w
desc.Flags = 0;
hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &desc, &swapchain);
- ok(SUCCEEDED(hr), "Failed to create swapchain, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDXGIFactory_Release(factory);
return swapchain;
@@ -921,7 +921,7 @@ static IDXGISwapChain *create_d3d10_swapchain(ID3D10Device1 *device, HWND window
HRESULT hr;
hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
- ok(SUCCEEDED(hr), "Failed to get DXGI device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
swapchain = create_swapchain(dxgi_device, window, windowed);
IDXGIDevice_Release(dxgi_device);
return swapchain;
@@ -935,9 +935,9 @@ static ID2D1RenderTarget *create_render_target_desc(IDXGISurface *surface,
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, desc, &render_target);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Factory_Release(factory);
return render_target;
@@ -967,7 +967,7 @@ static void release_test_context_(unsigned int line, struct d2d1_test_context *c
ID2D1RenderTarget_GetFactory(ctx->rt, &factory);
ID2D1RenderTarget_Release(ctx->rt);
ref = ID2D1Factory_Release(factory);
- ok_(__FILE__, line)(!ref, "Factory has %u references left.\n", ref);
+ ok_(__FILE__, line)(!ref, "Factory has %lu references left.\n", ref);
IDXGISurface_Release(ctx->surface);
IDXGISwapChain_Release(ctx->swapchain);
@@ -994,7 +994,7 @@ static BOOL init_test_context_(unsigned int line, struct d2d1_test_context *ctx,
ctx->swapchain = create_swapchain(ctx->device, ctx->window, TRUE);
ok_(__FILE__, line)(!!ctx->swapchain, "Failed to create swapchain.\n");
hr = IDXGISwapChain_GetBuffer(ctx->swapchain, 0, &IID_IDXGISurface, (void **)&ctx->surface);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get buffer, hr %#lx.\n", hr);
ctx->rt = create_render_target(ctx->surface, d3d11);
if (!ctx->rt && d3d11)
@@ -1026,7 +1026,7 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
return;
options = ID2D1Bitmap1_GetOptions(bitmap1);
- ok_(__FILE__, line)(options == expected_options, "Unexpected bitmap options %#x, expected %#x.\n",
+ ok_(__FILE__, line)(options == expected_options, "Got unexpected bitmap options %#x, expected %#lx.\n",
options, expected_options);
surface = (void *)0xdeadbeef;
@@ -1038,12 +1038,12 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
D2D1_SIZE_U pixel_size;
DWORD bind_flags = 0;
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get bitmap surface, hr %#lx.\n", hr);
ok_(__FILE__, line)(!!surface, "Expected surface instance.\n");
/* Correlate with resource configuration. */
hr = IDXGISurface_QueryInterface(surface, &IID_ID3D10Texture2D, (void **)&texture);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get texture pointer, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get texture pointer, hr %#lx.\n", hr);
ID3D10Texture2D_GetDesc(texture, &desc);
ok_(__FILE__, line)(desc.Usage == 0, "Unexpected usage %#x.\n", desc.Usage);
@@ -1072,7 +1072,7 @@ static void check_bitmap_surface_(unsigned int line, ID2D1Bitmap *bitmap, BOOL h
}
else
{
- ok_(__FILE__, line)(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok_(__FILE__, line)(!surface, "Unexpected surface instance.\n");
}
@@ -1289,7 +1289,7 @@ static void geometry_sink_check_(unsigned int line, const struct geometry_sink *
"Got unexpected figure %u, segment %u type %#x, expected %#x.\n",
i, j, segment->type, expected_segment->type);
ok_(__FILE__, line)(segment->flags == expected_segment->flags,
- "Got unexpected figure %u, segment %u flags %#x, expected %#x.\n",
+ "Got unexpected figure %u, segment %u flags %#lx, expected %#lx.\n",
i, j, segment->flags, expected_segment->flags);
switch (segment->type)
{
@@ -1480,7 +1480,7 @@ static void test_clip(BOOL d3d11)
ID2D1RenderTarget_PopAxisAlignedClip(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "035a44d4198d6e422e9de6185b5b2c2bac5e33c9");
ok(match, "Surface does not match.\n");
@@ -1546,7 +1546,7 @@ static void test_clip(BOOL d3d11)
ID2D1RenderTarget_PopAxisAlignedClip(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cb418ec4a7c8407b5e36db06fc6292a06bb8476c");
ok(match, "Surface does not match.\n");
@@ -1590,9 +1590,9 @@ static void test_state_block(BOOL d3d11)
rt = ctx.rt;
ID2D1RenderTarget_GetFactory(rt, &factory);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
- ok(SUCCEEDED(hr), "Failed to create dwrite factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateRenderingParams(dwrite_factory, &text_rendering_params1);
- ok(SUCCEEDED(hr), "Failed to create dwrite rendering params, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IDWriteFactory_Release(dwrite_factory);
drawing_state.antialiasMode = ID2D1RenderTarget_GetAntialiasMode(rt);
@@ -1613,7 +1613,7 @@ static void test_state_block(BOOL d3d11)
ok(!text_rendering_params2, "Got unexpected text rendering params %p.\n", text_rendering_params2);
hr = ID2D1Factory_CreateDrawingStateBlock(factory, NULL, NULL, &state_block);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
ok(drawing_state.antialiasMode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
"Got unexpected antialias mode %#x.\n", drawing_state.antialiasMode);
@@ -1635,7 +1635,7 @@ static void test_state_block(BOOL d3d11)
drawing_state.tag2 = 0xbeef;
drawing_state.transform = transform1;
hr = ID2D1Factory_CreateDrawingStateBlock(factory, &drawing_state, text_rendering_params1, &state_block);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock_GetDescription(state_block, &drawing_state);
ok(drawing_state.antialiasMode == D2D1_ANTIALIAS_MODE_ALIASED,
@@ -1743,7 +1743,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock1 *state_block1;
hr = ID2D1DrawingStateBlock_QueryInterface(state_block, &IID_ID2D1DrawingStateBlock1, (void **)&state_block1);
- ok(SUCCEEDED(hr), "Failed to get ID2D1DrawingStateBlock1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
ok(drawing_state1.antialiasMode == D2D1_ANTIALIAS_MODE_ALIASED,
@@ -1783,7 +1783,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock1_Release(state_block1);
hr = ID2D1Factory1_CreateDrawingStateBlock(factory1, NULL, NULL, &state_block1);
- ok(SUCCEEDED(hr), "Failed to create drawing state block, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DrawingStateBlock1_GetDescription(state_block1, &drawing_state1);
ok(drawing_state1.antialiasMode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
"Got unexpected antialias mode %#x.\n", drawing_state1.antialiasMode);
@@ -1808,7 +1808,7 @@ static void test_state_block(BOOL d3d11)
ID2D1DrawingStateBlock_Release(state_block);
refcount = IDWriteRenderingParams_Release(text_rendering_params1);
- ok(!refcount, "Rendering params %u references left.\n", refcount);
+ ok(!refcount, "Rendering params %lu references left.\n", refcount);
ID2D1Factory_Release(factory);
release_test_context(&ctx);
}
@@ -1835,7 +1835,7 @@ static void test_color_brush(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1SolidColorBrush_GetOpacity(brush);
ok(opacity == 1.0f, "Got unexpected opacity %.8e.\n", opacity);
set_matrix_identity(&matrix);
@@ -1856,7 +1856,7 @@ static void test_color_brush(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 2.0f);
brush_desc.transform = matrix;
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, &brush_desc, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1SolidColorBrush_GetOpacity(brush);
ok(opacity == 0.3f, "Got unexpected opacity %.8e.\n", opacity);
ID2D1SolidColorBrush_GetTransform(brush, &tmp_matrix);
@@ -1890,7 +1890,7 @@ static void test_color_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6d1218fca5e21fb7e287b3a439d60dbc251f5ceb");
ok(match, "Surface does not match.\n");
@@ -1964,11 +1964,11 @@ static void test_bitmap_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
image_size = ID2D1Bitmap_GetSize(bitmap);
hr = ID2D1Bitmap_QueryInterface(bitmap, &IID_ID2D1Image, (void **)&image);
- ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Vista */, "Failed to get ID2D1Image, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Vista */, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
ID2D1DeviceContext *context;
@@ -1976,7 +1976,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_RECT_F src_rect;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.0f, 0.0f, 1.0f, 1.0f);
@@ -2029,7 +2029,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_COMPOSITE_MODE_SOURCE_OVER);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
@@ -2041,7 +2041,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_COMPOSITE_MODE_SOURCE_OVER);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "95675fbc4a16404c9568d41b14e8f6be64240998");
ok(match, "Surface does not match.\n");
@@ -2053,7 +2053,7 @@ static void test_bitmap_brush(BOOL d3d11)
/* Creating a brush with a NULL bitmap crashes on Vista, but works fine on
* Windows 7+. */
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_GetBitmap(brush, &tmp_bitmap);
ok(tmp_bitmap == bitmap, "Got unexpected bitmap %p, expected %p.\n", tmp_bitmap, bitmap);
ID2D1Bitmap_Release(tmp_bitmap);
@@ -2075,7 +2075,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1BitmapBrush_Release(brush);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 40.0f, 120.0f);
scale_matrix(&matrix, 20.0f, 60.0f);
@@ -2130,7 +2130,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
@@ -2148,7 +2148,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_LINEAR + 1, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "f5d039c280fa33ba05496c9883192a34108efbbe");
ok(match, "Surface does not match.\n");
@@ -2160,7 +2160,7 @@ static void test_bitmap_brush(BOOL d3d11)
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, &src_rect);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "59043096393570ad800dbcbfdd644394b79493bd");
ok(match, "Surface does not match.\n");
@@ -2189,7 +2189,7 @@ static void test_bitmap_brush(BOOL d3d11)
}
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "b4b775afecdae2d26642001f4faff73663bb8b31");
ok(match, "Surface does not match.\n");
@@ -2197,7 +2197,7 @@ static void test_bitmap_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f / 20.0f;
bitmap_desc.dpiY = 96.0f / 60.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(brush, bitmap);
ID2D1RenderTarget_BeginDraw(rt);
@@ -2217,14 +2217,14 @@ static void test_bitmap_brush(BOOL d3d11)
set_rect(&dst_rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &dst_rect, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 240.0f, 720.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2238,7 +2238,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cf7b90ba7b139fdfbe9347e1907d635cfb4ed197");
ok(match, "Surface does not match.\n");
@@ -2287,7 +2287,7 @@ static void test_bitmap_brush(BOOL d3d11)
ID2D1BitmapBrush_Release(brush);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(!refcount, "Bitmap has %u references left.\n", refcount);
+ ok(!refcount, "Bitmap has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -2357,12 +2357,12 @@ static void test_linear_brush(BOOL d3d11)
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&gradient_properties.startPoint, 320.0f, 0.0f);
set_point(&gradient_properties.endPoint, 0.0f, 960.0f);
hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &gradient_properties, NULL, gradient, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
opacity = ID2D1LinearGradientBrush_GetOpacity(brush);
ok(opacity == 1.0f, "Got unexpected opacity %.8e.\n", opacity);
@@ -2389,7 +2389,7 @@ static void test_linear_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &r, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
@@ -2398,7 +2398,7 @@ static void test_linear_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test1[i].x, test1[i].y);
ok(compare_colour(colour, test1[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test1[i].x, test1[i].y);
}
release_resource_readback(&rb);
@@ -2439,14 +2439,14 @@ static void test_linear_brush(BOOL d3d11)
set_rect(&r, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &r, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 228.5f, 714.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2462,7 +2462,7 @@ static void test_linear_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
@@ -2471,14 +2471,14 @@ static void test_linear_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test2[i].x, test2[i].y);
ok(compare_colour(colour, test2[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test2[i].x, test2[i].y);
}
release_resource_readback(&rb);
ID2D1LinearGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(!refcount, "Gradient has %u references left.\n", refcount);
+ ok(!refcount, "Gradient has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -2548,14 +2548,14 @@ static void test_radial_brush(BOOL d3d11)
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&gradient_properties.center, 160.0f, 480.0f);
set_point(&gradient_properties.gradientOriginOffset, 40.0f, -120.0f);
gradient_properties.radiusX = 160.0f;
gradient_properties.radiusY = 480.0f;
hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &gradient_properties, NULL, gradient, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
f = ID2D1RadialGradientBrush_GetOpacity(brush);
ok(f == 1.0f, "Got unexpected opacity %.8e.\n", f);
@@ -2586,7 +2586,7 @@ static void test_radial_brush(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &r, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test1); ++i)
@@ -2595,7 +2595,7 @@ static void test_radial_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test1[i].x, test1[i].y);
ok(compare_colour(colour, test1[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test1[i].x, test1[i].y);
}
release_resource_readback(&rb);
@@ -2636,14 +2636,14 @@ static void test_radial_brush(BOOL d3d11)
set_rect(&r, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &r, &rectangle_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 228.5f, 714.0f);
scale_matrix(&matrix, 40.0f, 120.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)rectangle_geometry,
&matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(rectangle_geometry);
set_matrix_identity(&matrix);
@@ -2661,7 +2661,7 @@ static void test_radial_brush(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
for (i = 0; i < ARRAY_SIZE(test2); ++i)
@@ -2670,14 +2670,14 @@ static void test_radial_brush(BOOL d3d11)
colour = get_readback_colour(&rb, test2[i].x, test2[i].y);
ok(compare_colour(colour, test2[i].colour, 1),
- "Got unexpected colour 0x%08x at position {%u, %u}.\n",
+ "Got unexpected colour 0x%08lx at position {%u, %u}.\n",
colour, test2[i].x, test2[i].y);
}
release_resource_readback(&rb);
ID2D1RadialGradientBrush_Release(brush);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(!refcount, "Gradient has %u references left.\n", refcount);
+ ok(!refcount, "Gradient has %lu references left.\n", refcount);
release_test_context(&ctx);
}
@@ -3161,163 +3161,163 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Close() when closed. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Open() when closed. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Open() when open. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &tmp_sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!count, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* BeginFigure() without EndFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* EndFigure() without BeginFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* BeginFigure()/EndFigure() mismatch. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1PathGeometry_Release(geometry);
/* AddLine() outside BeginFigure()/EndFigure(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_AddLine(sink, point);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_AddLine(sink, point);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
/* Empty figure. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 123.0f, 456.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected segment count %u.\n", count);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 123.0f, 456.0f, 123.0f, 456.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3326,7 +3326,7 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 326.0f, 868.0f, 326.0f, 868.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3335,9 +3335,9 @@ static void test_path_geometry(BOOL d3d11)
/* Degenerate figure. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 123.0f, 456.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
quadratic_to(sink, 123.0f, 456.0f, 123.0f, 456.0f);
@@ -3345,52 +3345,52 @@ static void test_path_geometry(BOOL d3d11)
quadratic_to(sink, 123.0f, 456.0f, 123.0f, 456.0f);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 1, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected segment count %u.\n", count);
ID2D1PathGeometry_Release(geometry);
/* Close right after Open(). */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Not open yet. */
set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Open, not closed. */
set_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 1.0f, 2.0f, 3.0f, 4.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 0, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 0, "Got unexpected segment count %u.\n", count);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rect.left > rect.right && rect.top > rect.bottom,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom);
@@ -3399,7 +3399,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 10.0f, 20.0f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rect.left > rect.right && rect.top > rect.bottom,
"Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n", rect.left, rect.top, rect.right, rect.bottom);
@@ -3407,17 +3407,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 20.0f, 75.0f, 752.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3427,7 +3427,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 90.0f, 650.0f, 230.0f, 1016.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3436,17 +3436,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments and some hollow components. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 2);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 472.0f, 75.0f, 752.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3456,7 +3456,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 90.0f, 876.0f, 230.0f, 1016.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3465,17 +3465,17 @@ static void test_path_geometry(BOOL d3d11)
/* GetBounds() with bezier segments and all hollow components. */
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 4);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3485,7 +3485,7 @@ static void test_path_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.5f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, INFINITY, INFINITY, FLT_MAX, FLT_MAX, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3493,20 +3493,20 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* The fillmode that's used is the last one set before the sink is closed. */
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
fill_geometry_sink(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Intersections don't create extra segments. */
ok(count == 44, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
@@ -3515,13 +3515,13 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3529,12 +3529,12 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 1.0f, -1.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_init(&simplify_sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[6], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3549,7 +3549,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1Geometry_Simplify(tmp_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&tmp_matrix, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 6, &expected_figures[6], 0);
geometry_sink_cleanup(&simplify_sink);
ID2D1Geometry_Release(tmp_geometry);
@@ -3560,7 +3560,7 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "3aace1b22aae111cb577614fed16e4eb1650dba5");
ok(match, "Surface does not match.\n");
@@ -3568,13 +3568,13 @@ static void test_path_geometry(BOOL d3d11)
set_point(&point, 94.0f, 620.0f);
contains = TRUE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, NULL, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got unexpected contains %#x.\n", contains);
set_point(&point, 95.0f, 620.0f);
contains = FALSE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, NULL, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == TRUE, "Got unexpected contains %#x.\n", contains);
/* With transformation matrix. */
@@ -3583,31 +3583,31 @@ static void test_path_geometry(BOOL d3d11)
set_point(&point, 85.0f, 620.0f);
contains = FALSE;
hr = ID2D1TransformedGeometry_FillContainsPoint(transformed_geometry, point, &matrix, 0.0f, &contains);
- ok(hr == S_OK, "FillContainsPoint failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == TRUE, "Got unexpected contains %#x.\n", contains);
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 44, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 5.0f, 20.0f, 235.0f, 300.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3618,7 +3618,7 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 4.0f);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -3.17192993e+02f, 8.71231079e+01f, 4.04055908e+02f, 6.17453125e+02f, 1);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3626,7 +3626,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 6, &expected_figures[0], 0);
geometry_sink_cleanup(&simplify_sink);
@@ -3634,50 +3634,50 @@ static void test_path_geometry(BOOL d3d11)
translate_matrix(&matrix, 320.0f, 320.0f);
scale_matrix(&matrix, -1.0f, 1.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "bfb40a1f007694fa07dbd3b854f3f5d9c3e1d76b");
ok(match, "Surface does not match.\n");
ID2D1TransformedGeometry_Release(transformed_geometry);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 20, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[12], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 100.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[20], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 10.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[24], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -3687,12 +3687,12 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 4.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_init(&simplify_sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[16], 4);
geometry_sink_cleanup(&simplify_sink);
@@ -3701,7 +3701,7 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEECASLAQgKCIEBDQoMew8KD3YQDBByEgwSbhMOEmwUDhRpFBAUZxUQFWUVEhVjFhIWYRYUFl8X"
@@ -3750,37 +3750,37 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
fill_geometry_sink_bezier(sink, 0);
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_WINDING);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 4, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 20, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[12], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 100.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[20], 1);
geometry_sink_cleanup(&simplify_sink);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 10.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_WINDING, 4, &expected_figures[24], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -3790,14 +3790,14 @@ static void test_path_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -4.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 64,
"7xoCngECngECngECngECngECngECngECnQEEnAEEnAEEnAEEnAEEmwEGmgEGmgEGmgEGmQEImAEI"
"lAEQiwEagQEjeyh2LHIwbjNsNmk4ZzplPGM+YUBfQl1DXURbRlpGWUhYSFdKVkpVS1VMVExUTFRM"
@@ -3834,9 +3834,9 @@ static void test_path_geometry(BOOL d3d11)
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 20.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -3851,12 +3851,12 @@ static void test_path_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_GetFigureCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get figure count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 2, "Got unexpected figure count %u.\n", count);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 6, "Got unexpected segment count %u.\n", count);
ID2D1GeometrySink_Release(sink);
@@ -3864,40 +3864,40 @@ static void test_path_geometry(BOOL d3d11)
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "a875e68e0cb9c055927b1b50b879f90b24e38470");
ok(match, "Surface does not match.\n");
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 20.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
line_to(sink, 75.0f, 300.0f);
line_to(sink, 5.0f, 300.0f);
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
hr = ID2D1PathGeometry_GetSegmentCount(geometry, &count);
- ok(SUCCEEDED(hr), "Failed to get segment count, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(count == 2, "Got unexpected segment count %u.\n", count);
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[28], 1);
geometry_sink_cleanup(&simplify_sink);
ID2D1PathGeometry_Release(geometry);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -3924,12 +3924,12 @@ static void test_path_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1PathGeometry_GetBounds(geometry, NULL, &rect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 20.0f, 20.0f, 180.0f, 180.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -3937,7 +3937,7 @@ static void test_path_geometry(BOOL d3d11)
geometry_sink_init(&simplify_sink);
hr = ID2D1PathGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &simplify_sink.ID2D1SimplifiedGeometrySink_iface);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&simplify_sink, D2D1_FILL_MODE_ALTERNATE, 4, &expected_figures[29], 1);
geometry_sink_cleanup(&simplify_sink);
@@ -4010,11 +4010,11 @@ static void test_rectangle_geometry(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 0.0f, 0.0f, 0.0f, 0.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4023,7 +4023,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 50.0f, 0.0f, 40.0f, 100.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 50.0f, 0.0f, 40.0f, 100.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4032,7 +4032,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 0.0f, 100.0f, 40.0f, 50.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 0.0f, 100.0f, 40.0f, 50.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4041,7 +4041,7 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 50.0f, 100.0f, 40.0f, 50.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_GetRect(geometry, &rect2);
match = compare_rect(&rect2, 50.0f, 100.0f, 40.0f, 50.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
@@ -4050,63 +4050,63 @@ static void test_rectangle_geometry(BOOL d3d11)
set_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Edge. */
contains = FALSE;
set_point(&point, 0.0f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
/* Within tolerance limit around corner. */
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
contains = FALSE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE + 0.01f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE - 0.01f, 0.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
contains = TRUE;
set_point(&point, -D2D1_DEFAULT_FLATTENING_TOLERANCE, -D2D1_DEFAULT_FLATTENING_TOLERANCE);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!contains, "Got wrong hit test result %d.\n", contains);
/* Inside. */
contains = FALSE;
set_point(&point, 5.0f, 5.0f);
hr = ID2D1RectangleGeometry_FillContainsPoint(geometry, point, NULL, 0.0f, &contains);
- ok(SUCCEEDED(hr), "FillContainsPoint() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!!contains, "Got wrong hit test result %d.\n", contains);
/* Test GetBounds() and Simplify(). */
hr = ID2D1RectangleGeometry_GetBounds(geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[0], 0);
geometry_sink_cleanup(&sink);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[0], 0);
geometry_sink_cleanup(&sink);
@@ -4115,14 +4115,14 @@ static void test_rectangle_geometry(BOOL d3d11)
scale_matrix(&matrix, 3.0f, 2.0f);
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 2.00000000e+01f, 1.82442951e+01f, 7.95376282e+01f, 6.23606796e+01f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[1], 1);
geometry_sink_cleanup(&sink);
@@ -4130,14 +4130,14 @@ static void test_rectangle_geometry(BOOL d3d11)
translate_matrix(&matrix, 25.0f, 15.0f);
scale_matrix(&matrix, 0.0f, 2.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 25.0f, 15.0f, 25.0f, 55.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[2], 0);
geometry_sink_cleanup(&sink);
@@ -4145,14 +4145,14 @@ static void test_rectangle_geometry(BOOL d3d11)
translate_matrix(&matrix, 30.0f, 45.0f);
scale_matrix(&matrix, 0.5f, 0.0f);
hr = ID2D1RectangleGeometry_GetBounds(geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 30.0f, 45.0f, 35.0f, 45.0f, 0);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1RectangleGeometry_Simplify(geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[3], 0);
geometry_sink_cleanup(&sink);
@@ -4161,23 +4161,23 @@ static void test_rectangle_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / 3.0f);
translate_matrix(&matrix, 30.0f, 20.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory, (ID2D1Geometry *)geometry, &matrix, &transformed_geometry);
- ok(SUCCEEDED(hr), "Failed to create transformed geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -7.85640717e+01f, 1.79903809e+02f, 1.07179594e+01f, 2.73205078e+02f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[4], 1);
geometry_sink_cleanup(&sink);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
NULL, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[4], 1);
geometry_sink_cleanup(&sink);
@@ -4185,42 +4185,42 @@ static void test_rectangle_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -3.0f);
scale_matrix(&matrix, 0.25f, 0.2f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 30.0f, 20.0f, 40.0f, 40.0f, 2);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[5], 4);
geometry_sink_cleanup(&sink);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 2.0f, 0.0f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -1.57128143e+02f, 0.00000000e+00f, 2.14359188e+01f, 0.00000000e+00f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[6], 1);
geometry_sink_cleanup(&sink);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.0f, 0.5f);
ID2D1TransformedGeometry_GetBounds(transformed_geometry, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get bounds.\n");
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 0.00000000e+00f, 8.99519043e+01f, 0.00000000e+00, 1.36602539e+02f, 1);
ok(match, "Got unexpected bounds {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
geometry_sink_init(&sink);
hr = ID2D1TransformedGeometry_Simplify(transformed_geometry, D2D1_GEOMETRY_SIMPLIFICATION_OPTION_CUBICS_AND_LINES,
&matrix, 0.0f, &sink.ID2D1SimplifiedGeometrySink_iface);
- ok(SUCCEEDED(hr), "Failed to simplify geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
geometry_sink_check(&sink, D2D1_FILL_MODE_ALTERNATE, 1, &expected_figures[7], 1);
geometry_sink_cleanup(&sink);
@@ -4237,11 +4237,11 @@ static void test_rounded_rectangle_geometry(BOOL d3d11)
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rounded_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1Factory_CreateRoundedRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RoundedRectangleGeometry_GetRoundedRect(geometry, &rect2);
ok(!memcmp(&rect, &rect2, sizeof(rect)), "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e, %.8e, %.8e}.\n",
@@ -4325,10 +4325,10 @@ static void test_bitmap_formats(BOOL d3d11)
bitmap_desc.pixelFormat.alphaMode = j;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
if (bitmap_formats[i].mask & (1u << j))
- ok(hr == S_OK, "Got unexpected hr %#x, for format %#x/%#x.\n",
+ ok(hr == S_OK, "Got unexpected hr %#lx, for format %#x/%#x.\n",
hr, bitmap_formats[i].format, j);
else
- ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#x, for format %#x/%#x.\n",
+ ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#lx, for format %#x/%#x.\n",
hr, bitmap_formats[i].format, j);
if (SUCCEEDED(hr))
ID2D1Bitmap_Release(bitmap);
@@ -4374,22 +4374,22 @@ static void test_alpha_mode(BOOL d3d11)
bitmap_desc.dpiX = 96.0f / 40.0f;
bitmap_desc.dpiY = 96.0f / 30.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
ID2D1BitmapBrush_SetExtendModeX(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
ID2D1BitmapBrush_SetExtendModeY(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
set_color(&color, 0.0f, 1.0f, 0.0f, 0.75f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(SUCCEEDED(hr), "Failed to create brush, hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "48c41aff3a130a17ee210866b2ab7d36763934d5");
ok(match, "Surface does not match.\n");
@@ -4397,7 +4397,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 1.0f, 0.0f, 0.0f, 0.25f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6487e683730fb5a77c1911388d00b04664c5c4e4");
ok(match, "Surface does not match.\n");
@@ -4405,7 +4405,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 1.0f, 0.75f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "7a35ba09e43cbaf591388ff1ef8de56157630c98");
ok(match, "Surface does not match.\n");
@@ -4423,7 +4423,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
set_rect(&rect, 0.0f, 120.0f, 160.0f, 240.0f);
@@ -4446,7 +4446,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)color_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "14f8ac64b70966c7c3c6281c59aaecdb17c3b16a");
ok(match, "Surface does not match.\n");
@@ -4465,12 +4465,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
ID2D1BitmapBrush_Release(bitmap_brush);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
ID2D1BitmapBrush_SetExtendModeX(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
ID2D1BitmapBrush_SetExtendModeY(bitmap_brush, D2D1_EXTEND_MODE_WRAP);
@@ -4478,12 +4478,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1SolidColorBrush_Release(color_brush);
set_color(&color, 0.0f, 1.0f, 0.0f, 0.75f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "b44510bf2d2e61a8d7c0ad862de49a471f1fd13f");
ok(match, "Surface does not match.\n");
@@ -4491,7 +4491,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 1.0f, 0.0f, 0.0f, 0.25f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "2184f4a9198fc1de09ac85301b7a03eebadd9b81");
ok(match, "Surface does not match.\n");
@@ -4499,7 +4499,7 @@ static void test_alpha_mode(BOOL d3d11)
set_color(&color, 0.0f, 0.0f, 1.0f, 0.75f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "6527ec83b4039c895b50f9b3e144fe0cf90d1889");
ok(match, "Surface does not match.\n");
@@ -4517,7 +4517,7 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1Bitmap_Release(bitmap);
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetBitmap(bitmap_brush, bitmap);
set_rect(&rect, 0.0f, 120.0f, 160.0f, 240.0f);
@@ -4540,12 +4540,12 @@ static void test_alpha_mode(BOOL d3d11)
ID2D1RenderTarget_FillRectangle(rt, &rect, (ID2D1Brush *)color_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "465f5a3190d7bde408b3206b4be939fb22f8a3d6");
ok(match, "Surface does not match.\n");
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Bitmap has %u references left.\n", refcount);
+ ok(refcount == 1, "Bitmap has %lu references left.\n", refcount);
ID2D1SolidColorBrush_Release(color_brush);
ID2D1BitmapBrush_Release(bitmap_brush);
ID2D1RenderTarget_Release(rt);
@@ -4579,18 +4579,18 @@ static void test_shared_bitmap(BOOL d3d11)
window2 = create_window();
swapchain2 = create_swapchain(ctx.device, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap1);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 640, 480,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -4607,32 +4607,32 @@ static void test_shared_bitmap(BOOL d3d11)
bitmap_desc.dpiY = 96.0f;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory1);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory2);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* DXGI surface render targets with the same device and factory. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, ctx.surface, &desc, &rt1);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
check_bitmap_surface(bitmap1, TRUE, 0);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface(bitmap2, TRUE, 0);
ID2D1Bitmap_Release(bitmap2);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IUnknown, bitmap1, NULL, &bitmap2);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with the same device but different factories. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with different devices but the same factory. */
@@ -4642,55 +4642,55 @@ static void test_shared_bitmap(BOOL d3d11)
ok(!!device2, "Failed to create device.\n");
swapchain2 = create_swapchain(device2, window2, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain2, 0, &IID_IDXGISurface, (void **)&surface2);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render targets with different devices and different factories. */
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* DXGI surface render target and WIC bitmap render target, same factory. */
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_OPERATION, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* WIC bitmap render targets on different D2D factories. */
ID2D1Bitmap_Release(bitmap1);
ID2D1RenderTarget_Release(rt1);
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap1, &desc, &rt1);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmap(rt1, size, NULL, 0, &bitmap_desc, &bitmap1);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt1, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == rt1, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
ID2D1GdiInteropRenderTarget_Release(interop);
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory2, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt2);
/* WIC bitmap render targets on the same D2D factory. */
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory1, wic_bitmap2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_ID2D1Bitmap, bitmap1, NULL, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface(bitmap2, FALSE, 0);
ID2D1Bitmap_Release(bitmap2);
ID2D1RenderTarget_Release(rt2);
@@ -4705,7 +4705,7 @@ static void test_shared_bitmap(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory1, surface2, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED;
@@ -4713,7 +4713,7 @@ static void test_shared_bitmap(BOOL d3d11)
bitmap_desc.dpiY = 0.0f;
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &bitmap2);
- ok(SUCCEEDED(hr) || broken(hr == E_INVALIDARG) /* vista */, "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG) /* vista */, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -4745,7 +4745,7 @@ static void test_shared_bitmap(BOOL d3d11)
size = ID2D1Bitmap_GetPixelSize(bitmap2);
hr = IDXGISurface_GetDesc(surface2, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface description, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(size.width == surface_desc.Width && size.height == surface_desc.Height, "Got wrong bitmap size.\n");
check_bitmap_surface(bitmap2, TRUE, D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW);
@@ -4756,7 +4756,7 @@ static void test_shared_bitmap(BOOL d3d11)
if (IDXGISurface_QueryInterface(surface2, &IID_IDXGISurface1, (void **)&surface3) == S_OK)
{
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface1, surface3, &bitmap_desc, &bitmap2);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap2);
IDXGISurface1_Release(surface3);
@@ -4768,7 +4768,7 @@ static void test_shared_bitmap(BOOL d3d11)
hr = ID2D1RenderTarget_CreateSharedBitmap(rt2, &IID_IDXGISurface, surface2, &bitmap_desc, &bitmap2);
todo_wine_if(i == 2 || i == 3 || i == 5 || i == 6)
- ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == bitmap_format_tests[i].hr, "%u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(bitmap_format_tests[i].hr))
{
@@ -4836,7 +4836,7 @@ static void test_bitmap_updates(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 320.0f, 240.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
@@ -4846,7 +4846,7 @@ static void test_bitmap_updates(BOOL d3d11)
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 240.0f, 320.0f, 480.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
@@ -4854,31 +4854,31 @@ static void test_bitmap_updates(BOOL d3d11)
set_rect_u(&dst_rect, 1, 1, 3, 3);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, bitmap_data, 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 3, 3, 4);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[6], 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 0, 4, 1);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[10], 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 0, 1, 1, 3);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, &bitmap_data[2], sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect_u(&dst_rect, 4, 4, 3, 1);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, &dst_rect, bitmap_data, sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 320.0f, 240.0f, 640.0f, 480.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
hr = ID2D1Bitmap_CopyFromMemory(bitmap, NULL, bitmap_data, 4 * sizeof(*bitmap_data));
- ok(SUCCEEDED(hr), "Failed to update bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 320.0f, 0.0f, 640.0f, 240.0f);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, &rect, 1.0f,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "cb8136c91fbbdc76bb83b8c09edc1907b0a5d0a6");
ok(match, "Surface does not match.\n");
@@ -4924,7 +4924,7 @@ static void test_opacity_brush(BOOL d3d11)
set_color(&color, 0.0f, 1.0f, 0.0f, 0.8f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &color_brush);
- ok(SUCCEEDED(hr), "Failed to create color brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_size_u(&size, 4, 4);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -4932,12 +4932,12 @@ static void test_opacity_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &opacity_brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(opacity_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
set_size_u(&size, 1, 1);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -4945,12 +4945,12 @@ static void test_opacity_brush(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, &bitmap_data[2], sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, &bitmap_brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapBrush_SetInterpolationMode(bitmap_brush, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5000,7 +5000,7 @@ static void test_opacity_brush(BOOL d3d11)
(ID2D1Brush *)bitmap_brush, (ID2D1Brush *)opacity_brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INCOMPATIBLE_BRUSH_TYPES, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "7141c6c7b3decb91196428efb1856bcbf9872935");
ok(match, "Surface does not match.\n");
ID2D1RenderTarget_BeginDraw(rt);
@@ -5042,7 +5042,7 @@ static void test_opacity_brush(BOOL d3d11)
ID2D1RectangleGeometry_Release(geometry);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_surface(&ctx, "c3a5802d1750efa3e9122c1a92f6064df3872732");
ok(match, "Surface does not match.\n");
@@ -5080,7 +5080,7 @@ static void test_create_target(BOOL d3d11)
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(create_dpi_tests); ++i)
{
@@ -5099,21 +5099,21 @@ static void test_create_target(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
- ok(hr == create_dpi_tests[i].hr, "Wrong return code, hr %#x, expected %#x, test %u.\n", hr,
- create_dpi_tests[i].hr, i);
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpect hr %#lx, expected %#lx.\n",
+ i, hr, create_dpi_tests[i].hr);
if (FAILED(hr))
continue;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_IUnknown, (void **)&unk);
- ok(SUCCEEDED(hr), "Failed to get IUnknown, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(unk == (IUnknown *)rt, "Expected same interface pointer.\n");
IUnknown_Release(unk);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5185,10 +5185,10 @@ static void test_draw_text_layout(BOOL d3d11)
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory2);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(factory != factory2, "got same factory\n");
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -5200,33 +5200,33 @@ static void test_draw_text_layout(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, ctx.surface, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory2, ctx.surface, &desc, &rt2);
- ok(SUCCEEDED(hr), "Failed to create a target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory, (IUnknown **)&dwrite_factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextFormat(dwrite_factory, L"Tahoma", NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, 10.0f, L"", &text_format);
- ok(SUCCEEDED(hr), "Failed to create text format, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDWriteFactory_CreateTextLayout(dwrite_factory, L"text", 4, text_format, 100.0f, 100.0f, &text_layout);
- ok(SUCCEEDED(hr), "Failed to create text layout, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt2, &color, NULL, &brush2);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* effect brush is created from different factory */
range.startPosition = 0;
range.length = 4;
hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (IUnknown*)brush2, range);
- ok(SUCCEEDED(hr), "Failed to set drawing effect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5234,17 +5234,17 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- todo_wine ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == D2DERR_WRONG_FACTORY, "Got unexpected hr %#lx.\n", hr);
/* Effect is d2d resource, but not a brush. */
set_rect(&rect, 0.0f, 0.0f, 10.0f, 10.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &geometry);
- ok(SUCCEEDED(hr), "Failed to geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
range.startPosition = 0;
range.length = 4;
hr = IDWriteTextLayout_SetDrawingEffect(text_layout, (IUnknown*)geometry, range);
- ok(SUCCEEDED(hr), "Failed to set drawing effect, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RectangleGeometry_Release(geometry);
ID2D1RenderTarget_BeginDraw(rt);
@@ -5253,7 +5253,7 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush*)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(antialias_mode_tests); ++i)
{
@@ -5263,7 +5263,7 @@ static void test_draw_text_layout(BOOL d3d11)
hr = IDWriteFactory_CreateCustomRenderingParams(dwrite_factory, 2.0f, 1.0f, 0.0f, DWRITE_PIXEL_GEOMETRY_FLAT,
antialias_mode_tests[i].rendering_mode, &rendering_params);
- ok(SUCCEEDED(hr), "Failed to create custom rendering params, hr %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ID2D1RenderTarget_SetTextRenderingParams(rt, rendering_params);
@@ -5272,7 +5272,7 @@ static void test_draw_text_layout(BOOL d3d11)
ID2D1RenderTarget_DrawTextLayout(rt, origin, text_layout, (ID2D1Brush *)brush, D2D1_DRAW_TEXT_OPTIONS_NONE);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == antialias_mode_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == antialias_mode_tests[i].hr, "Test %u: Got unexpected hr %#lx.\n", i, hr);
IDWriteRenderingParams_Release(rendering_params);
}
@@ -5343,7 +5343,7 @@ static void test_dc_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(invalid_formats); ++i)
{
@@ -5355,7 +5355,7 @@ static void test_dc_target(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_UNSUPPORTED_PIXEL_FORMAT, "Got unexpected hr %#lx.\n", hr);
}
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -5366,16 +5366,16 @@ static void test_dc_target(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DCRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1DCRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1DCRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5391,18 +5391,18 @@ static void test_dc_target(BOOL d3d11)
/* object creation methods work without BindDC() */
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1DCRenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1SolidColorBrush_Release(brush);
ID2D1DCRenderTarget_BeginDraw(rt);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_Release(rt);
/* BindDC() */
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
aa_mode = ID2D1DCRenderTarget_GetAntialiasMode(rt);
ok(aa_mode == D2D1_ANTIALIAS_MODE_PER_PRIMITIVE, "Got wrong default aa mode %d.\n", aa_mode);
@@ -5419,7 +5419,7 @@ static void test_dc_target(BOOL d3d11)
SetRect(&rect, 0, 0, 32, 32);
hr = ID2D1DCRenderTarget_BindDC(rt, NULL, &rect);
- ok(hr == E_INVALIDARG, "BindDC() returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Target properties are retained during BindDC() */
ID2D1DCRenderTarget_SetTags(rt, 1, 2);
@@ -5431,7 +5431,7 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_SetTransform(rt, &matrix);
hr = ID2D1DCRenderTarget_BindDC(rt, hdc, &rect);
- ok(hr == S_OK, "BindDC() returned %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_GetTags(rt, &t1, &t2);
ok(t1 == 1 && t2 == 2, "Got wrong tags.\n");
@@ -5460,10 +5460,10 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc, 0, 0);
- ok(clr == RGB(255, 0, 0), "Unexpected color 0x%08x.\n", clr);
+ ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08lx.\n", clr);
hdc2 = CreateCompatibleDC(NULL);
ok(hdc2 != NULL, "Failed to create an HDC.\n");
@@ -5471,14 +5471,14 @@ static void test_dc_target(BOOL d3d11)
create_target_dibsection(hdc2, 16, 16);
hr = ID2D1DCRenderTarget_BindDC(rt, hdc2, &rect);
- ok(hr == S_OK, "BindDC() returned %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- ok(clr == 0, "Unexpected color 0x%08x.\n", clr);
+ ok(clr == 0, "Got unexpected colour 0x%08lx.\n", clr);
set_color(&color, 0.0f, 1.0f, 0.0f, 1.0f);
hr = ID2D1DCRenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5488,19 +5488,19 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_FillRectangle(rt, &r, (ID2D1Brush*)brush);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1SolidColorBrush_Release(brush);
clr = GetPixel(hdc2, 0, 0);
- ok(clr == RGB(0, 255, 0), "Unexpected color 0x%08x.\n", clr);
+ ok(clr == RGB(0, 255, 0), "Got unexpected colour 0x%08lx.\n", clr);
clr = GetPixel(hdc2, 10, 0);
- ok(clr == 0, "Unexpected color 0x%08x.\n", clr);
+ ok(clr == 0, "Got unexpected colour 0x%08lx.\n", clr);
/* Invalid DC. */
hr = ID2D1DCRenderTarget_BindDC(rt, (HDC)0xdeadbeef, &rect);
- todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5508,13 +5508,13 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- todo_wine ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08x.\n", clr);
+ todo_wine ok(clr == RGB(255, 0, 0), "Got unexpected colour 0x%08lx.\n", clr);
hr = ID2D1DCRenderTarget_BindDC(rt, NULL, &rect);
- ok(hr == E_INVALIDARG, "BindDC() returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID2D1DCRenderTarget_BeginDraw(rt);
@@ -5522,10 +5522,10 @@ static void test_dc_target(BOOL d3d11)
ID2D1DCRenderTarget_Clear(rt, &color);
hr = ID2D1DCRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
clr = GetPixel(hdc2, 0, 0);
- todo_wine ok(clr == RGB(0, 0, 255), "Got unexpected colour 0x%08x.\n", clr);
+ todo_wine ok(clr == RGB(0, 0, 255), "Got unexpected colour 0x%08lx.\n", clr);
DeleteDC(hdc);
DeleteDC(hdc2);
@@ -5550,7 +5550,7 @@ static void test_hwnd_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -5566,25 +5566,25 @@ static void test_hwnd_target(BOOL d3d11)
hwnd_rt_desc.presentOptions = D2D1_PRESENT_OPTIONS_NONE;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(FAILED(hr), "Target creation should fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
hwnd_rt_desc.hwnd = (HWND)0xdeadbeef;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(FAILED(hr), "Target creation should fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
hwnd_rt_desc.hwnd = CreateWindowA("static", "d2d_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1HwndRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1HwndRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1HwndRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5592,7 +5592,7 @@ static void test_hwnd_target(BOOL d3d11)
size.width = 128;
size.height = 64;
hr = ID2D1HwndRenderTarget_Resize(rt, &size);
- ok(SUCCEEDED(hr), "Failed to resize render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1HwndRenderTarget_Release(rt);
@@ -5634,7 +5634,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
{
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, size_tests[i].size, size_tests[i].pixel_size,
NULL, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &bitmap_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "%u: Failed to create render target, hr %#x.\n", i, hr);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "%u: Failed to create render target, hr %#lx.\n", i, hr);
if (size_tests[i].pixel_size)
{
@@ -5671,7 +5671,7 @@ static void test_compatible_target_size_(unsigned int line, ID2D1RenderTarget *r
pixel_size.height = pixel_size.width = 0;
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &bitmap_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create render target, hr %#lx.\n", hr);
if (SUCCEEDED(ID2D1BitmapRenderTarget_QueryInterface(bitmap_rt, &IID_ID2D1DeviceContext, (void **)&context)))
{
@@ -5717,7 +5717,7 @@ static void test_bitmap_target(BOOL d3d11)
release_test_context(&ctx);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
@@ -5734,22 +5734,22 @@ static void test_bitmap_target(BOOL d3d11)
hwnd_rt_desc.presentOptions = D2D1_PRESENT_OPTIONS_NONE;
hr = ID2D1Factory_CreateHwndRenderTarget(factory, &desc, &hwnd_rt_desc, &hwnd_rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
test_compatible_target_size((ID2D1RenderTarget *)hwnd_rt);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get interop target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1RenderTarget, (void **)&rt3);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt3 == (ID2D1RenderTarget *)rt, "Unexpected render target\n");
ID2D1RenderTarget_Release(rt3);
hr = ID2D1GdiInteropRenderTarget_QueryInterface(interop, &IID_ID2D1BitmapRenderTarget, (void **)&rt2);
- ok(SUCCEEDED(hr), "Failed to get render target back, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(rt2 == rt, "Unexpected render target\n");
ID2D1BitmapRenderTarget_Release(rt2);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -5757,7 +5757,7 @@ static void test_bitmap_target(BOOL d3d11)
/* See if parent target is referenced. */
ID2D1HwndRenderTarget_AddRef(hwnd_rt);
refcount = ID2D1HwndRenderTarget_Release(hwnd_rt);
- ok(refcount == 1, "Target should not have been referenced, got %u.\n", refcount);
+ ok(refcount == 1, "Target should not have been referenced, got %lu.\n", refcount);
/* Size was not specified, should match parent. */
pixel_size = ID2D1HwndRenderTarget_GetPixelSize(hwnd_rt);
@@ -5778,7 +5778,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_u(&pixel_size, 32, 32);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, NULL, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size2 = ID2D1BitmapRenderTarget_GetPixelSize(rt);
ok(!memcmp(&pixel_size, &pixel_size2, sizeof(pixel_size)), "Got target pixel size mismatch.\n");
@@ -5792,7 +5792,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_u(&pixel_size, 128, 128);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &size, &pixel_size, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Doubled pixel size dimensions with the same DIP size give doubled dpi. */
ID2D1BitmapRenderTarget_GetDpi(rt, dpi2, dpi2 + 1);
@@ -5804,7 +5804,7 @@ static void test_bitmap_target(BOOL d3d11)
set_size_f(&size, 70.1f, 70.4f);
hr = ID2D1HwndRenderTarget_CreateCompatibleRenderTarget(hwnd_rt, &size, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1BitmapRenderTarget_GetDpi(rt, dpi2, dpi2 + 1);
@@ -5822,9 +5822,9 @@ static void test_bitmap_target(BOOL d3d11)
/* Check if GetBitmap() returns same instance. */
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap2);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(bitmap == bitmap2, "Got different bitmap instances.\n");
/* Draw something, see if bitmap instance is retained. */
@@ -5832,18 +5832,18 @@ static void test_bitmap_target(BOOL d3d11)
set_color(&color, 1.0f, 1.0f, 0.0f, 1.0f);
ID2D1BitmapRenderTarget_Clear(rt, &color);
hr = ID2D1BitmapRenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap2);
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap2);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(bitmap == bitmap2, "Got different bitmap instances.\n");
ID2D1Bitmap_Release(bitmap);
ID2D1Bitmap_Release(bitmap2);
refcount = ID2D1BitmapRenderTarget_Release(rt);
- ok(!refcount, "Target should be released, got %u.\n", refcount);
+ ok(!refcount, "Target should be released, got %lu.\n", refcount);
DestroyWindow(hwnd_rt_desc.hwnd);
@@ -5856,19 +5856,19 @@ static void test_bitmap_target(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDCRenderTarget(factory, &desc, &dc_rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
test_compatible_target_size((ID2D1RenderTarget *)dc_rt);
hr = ID2D1DCRenderTarget_CreateCompatibleRenderTarget(dc_rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size = ID2D1BitmapRenderTarget_GetPixelSize(rt);
ok(pixel_size.width == 0 && pixel_size.height == 0, "Got wrong size\n");
hr = ID2D1BitmapRenderTarget_GetBitmap(rt, &bitmap);
- ok(SUCCEEDED(hr), "GetBitmap() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_size = ID2D1Bitmap_GetPixelSize(bitmap);
ok(pixel_size.width == 0 && pixel_size.height == 0, "Got wrong size\n");
ID2D1Bitmap_Release(bitmap);
@@ -5886,7 +5886,7 @@ static void test_desktop_dpi(BOOL d3d11)
HRESULT hr;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
dpi_x = dpi_y = 0.0f;
ID2D1Factory_GetDesktopDpi(factory, &dpi_x, &dpi_y);
@@ -5924,7 +5924,7 @@ static void test_stroke_style(BOOL d3d11)
float dashes[2];
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
desc.startCap = D2D1_CAP_STYLE_SQUARE;
desc.endCap = D2D1_CAP_STYLE_ROUND;
@@ -5935,7 +5935,7 @@ static void test_stroke_style(BOOL d3d11)
desc.dashOffset = -1.0f;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
cap_style = ID2D1StrokeStyle_GetStartCap(style);
ok(cap_style == D2D1_CAP_STYLE_SQUARE, "Unexpected cap style %d.\n", cap_style);
@@ -5964,24 +5964,24 @@ static void test_stroke_style(BOOL d3d11)
ID2D1StrokeStyle_Release(style);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 1, &style);
- ok(hr == S_OK, "Unexpected return value, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1StrokeStyle_Release(style);
/* Builtin style, dashes are specified. */
desc.dashStyle = D2D1_DASH_STYLE_DOT;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, dashes, 1, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Invalid style. */
desc.dashStyle = 100;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(hr == E_INVALIDARG, "Unexpected return value, %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
/* Test returned dash pattern for builtin styles. */
desc.startCap = D2D1_CAP_STYLE_SQUARE;
@@ -5999,7 +5999,7 @@ static void test_stroke_style(BOOL d3d11)
desc.dashStyle = dash_style_tests[i].dash_style;
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 0, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
dash_count = ID2D1StrokeStyle_GetDashesCount(style);
ok(dash_count == dash_style_tests[i].dash_count, "%u: unexpected dash count %u, expected %u.\n",
@@ -6029,7 +6029,7 @@ static void test_stroke_style(BOOL d3d11)
/* NULL dashes array, non-zero length. */
memset(&desc, 0, sizeof(desc));
hr = ID2D1Factory_CreateStrokeStyle(factory, &desc, NULL, 1, &style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1StrokeStyle_GetDashesCount(style);
ok(count == 0, "Unexpected dashes count %u.\n", count);
@@ -6059,7 +6059,7 @@ static void test_gradient(BOOL d3d11)
stops2[1] = stops2[0];
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops2, 2, D2D1_GAMMA_2_2,
D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1GradientStopCollection_GetGradientStopCount(gradient);
ok(count == 2, "Unexpected stop count %u.\n", count);
@@ -6112,7 +6112,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.396f, 0.180f, 0.537f, 1.0f);
@@ -6149,7 +6149,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawEllipse(rt, &ellipse, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
ok(match, "Figure does not match.\n");
@@ -6242,7 +6242,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
@@ -6336,7 +6336,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "iGIQjgEUjAEUjgEQiGIA");
todo_wine ok(match, "Figure does not match.\n");
@@ -6399,9 +6399,9 @@ static void test_draw_geometry(BOOL d3d11)
todo_wine ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 160.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -6471,14 +6471,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 5.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "");
@@ -6550,11 +6550,11 @@ static void test_draw_geometry(BOOL d3d11)
set_rect(&rect, 20.0f, 80.0f, 60.0f, 240.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -6562,14 +6562,14 @@ static void test_draw_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)rect_geometry[1], &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.5f, 1.0f);
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[0], &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -6577,7 +6577,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -6586,7 +6586,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[1], (ID2D1Brush *)brush, 5.0f, NULL);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, 15.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
@@ -6653,9 +6653,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -6754,14 +6754,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
@@ -6876,9 +6876,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -6897,7 +6897,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -6905,7 +6905,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -6913,7 +6913,7 @@ static void test_draw_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -6921,7 +6921,7 @@ static void test_draw_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -6929,7 +6929,7 @@ static void test_draw_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -6938,7 +6938,7 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, 5.0f, NULL);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, 15.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -6990,9 +6990,9 @@ static void test_draw_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -7005,14 +7005,14 @@ static void test_draw_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_DrawGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, 10.0f, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 32,
@@ -7062,7 +7062,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 0.396f, 0.180f, 0.537f, 1.0f);
@@ -7087,7 +7087,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillEllipse(rt, &ellipse, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 160, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7145,7 +7145,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7215,7 +7215,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillRoundedRectangle(rt, &rounded_rect, (ID2D1Brush *)brush);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
ok(match, "Figure does not match.\n");
@@ -7254,9 +7254,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 40.0f, 160.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7326,14 +7326,14 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_SetFillMode(sink, D2D1_FILL_MODE_ALTERNATE);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0, "gMgB");
@@ -7381,11 +7381,11 @@ static void test_fill_geometry(BOOL d3d11)
set_rect(&rect, 20.0f, 80.0f, 60.0f, 240.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rect_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7393,14 +7393,14 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)rect_geometry[1], &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
scale_matrix(&matrix, 0.5f, 1.0f);
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[0], &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7408,7 +7408,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7417,7 +7417,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[1], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
ID2D1TransformedGeometry_Release(transformed_geometry[0]);
@@ -7463,9 +7463,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 20.0f, 80.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7564,14 +7564,14 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 0, 0, 160, 160, 0xff652e89, 0,
@@ -7645,9 +7645,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -7666,7 +7666,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -7674,7 +7674,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7682,7 +7682,7 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -7690,7 +7690,7 @@ static void test_fill_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7698,7 +7698,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7707,7 +7707,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -7749,9 +7749,9 @@ static void test_fill_geometry(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, -0.402914f, 0.915514f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_HOLLOW);
@@ -7770,7 +7770,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
set_matrix_identity(&matrix);
@@ -7778,7 +7778,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 20.0f, 80.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
translate_matrix(&matrix, 160.0f, 640.0f);
@@ -7786,7 +7786,7 @@ static void test_fill_geometry(BOOL d3d11)
rotate_matrix(&matrix, M_PI / -5.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)geometry, &matrix, &transformed_geometry[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
set_matrix_identity(&matrix);
@@ -7794,7 +7794,7 @@ static void test_fill_geometry(BOOL d3d11)
translate_matrix(&matrix, -80.0f, 0.0f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[1], &matrix, &transformed_geometry[2]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_matrix_identity(&matrix);
rotate_matrix(&matrix, M_PI / 2.0f);
@@ -7802,7 +7802,7 @@ static void test_fill_geometry(BOOL d3d11)
scale_matrix(&matrix, 2.0f, 0.25f);
hr = ID2D1Factory_CreateTransformedGeometry(factory,
(ID2D1Geometry *)transformed_geometry[2], &matrix, &transformed_geometry[3]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
@@ -7811,7 +7811,7 @@ static void test_fill_geometry(BOOL d3d11)
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[2], (ID2D1Brush *)brush, NULL);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)transformed_geometry[3], (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1TransformedGeometry_Release(transformed_geometry[3]);
ID2D1TransformedGeometry_Release(transformed_geometry[2]);
ID2D1TransformedGeometry_Release(transformed_geometry[1]);
@@ -7851,15 +7851,15 @@ static void test_gdi_interop(BOOL d3d11)
return;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
/* WIC target, default usage */
@@ -7872,19 +7872,19 @@ static void test_gdi_interop(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory, wic_bitmap, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get gdi interop interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
dc = (void *)0xdeadbeef;
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(FAILED(hr), "GetDC() was expected to fail, hr %#x.\n", hr);
+ ok(hr != S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!dc, "Got unexpected DC %p.\n", dc);
ID2D1GdiInteropRenderTarget_Release(interop);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_Release(rt);
@@ -7892,25 +7892,25 @@ static void test_gdi_interop(BOOL d3d11)
desc.usage = D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE;
hr = ID2D1Factory_CreateWicBitmapRenderTarget(factory, wic_bitmap, &desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1GdiInteropRenderTarget, (void **)&interop);
- ok(SUCCEEDED(hr), "Failed to get gdi interop interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
dc = NULL;
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(dc != NULL, "Expected NULL dc, got %p.\n", dc);
ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
set_color(&color, 1.0f, 0.0f, 0.0f, 1.0f);
ID2D1RenderTarget_Clear(rt, &color);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_wic_bitmap(wic_bitmap, "54034063dbc1c1bb61cb60ec57e4498678dc2b13");
ok(match, "Bitmap does not match.\n");
@@ -7919,37 +7919,37 @@ static void test_gdi_interop(BOOL d3d11)
ID2D1RenderTarget_BeginDraw(rt);
hr = ID2D1GdiInteropRenderTarget_GetDC(interop, D2D1_DC_INITIALIZE_MODE_COPY, &dc);
- ok(SUCCEEDED(hr), "GetDC() was expected to succeed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 16, 16);
FillRect(dc, &rect, GetStockObject(BLACK_BRUSH));
ID2D1GdiInteropRenderTarget_ReleaseDC(interop, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_wic_bitmap(wic_bitmap, "60cacbf3d72e1e7834203da608037b1bf83b40e8");
ok(match, "Bitmap does not match.\n");
/* Bitmap is locked at BeginDraw(). */
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICBitmapLock_Release(wic_lock);
ID2D1RenderTarget_BeginDraw(rt);
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
IWICBitmapLock_Release(wic_lock);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "EndDraw() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Lock before BeginDraw(). */
hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
- ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_BeginDraw(rt);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Got unexpected hr %#lx.\n", hr);
IWICBitmapLock_Release(wic_lock);
ID2D1GdiInteropRenderTarget_Release(interop);
@@ -7979,7 +7979,7 @@ static void test_layer(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
hr = ID2D1RenderTarget_CreateLayer(rt, NULL, &layer);
- ok(SUCCEEDED(hr), "Failed to create layer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Layer_GetFactory(layer, &layer_factory);
ok(layer_factory == factory, "Got unexpected layer factory %p, expected %p.\n", layer_factory, factory);
ID2D1Factory_Release(layer_factory);
@@ -7990,7 +7990,7 @@ static void test_layer(BOOL d3d11)
set_size_f(&size, 800.0f, 600.0f);
hr = ID2D1RenderTarget_CreateLayer(rt, &size, &layer);
- ok(SUCCEEDED(hr), "Failed to create layer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
size = ID2D1Layer_GetSize(layer);
ok(size.width == 800.0f, "Got unexpected width %.8e.\n", size.width);
ok(size.height == 600.0f, "Got unexpected height %.8e.\n", size.height);
@@ -8023,12 +8023,12 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1RenderTarget_SetAntialiasMode(rt, D2D1_ANTIALIAS_MODE_ALIASED);
set_color(&color, 0.890f, 0.851f, 0.600f, 1.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, &brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 160.0f, 720.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -8049,7 +8049,7 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
@@ -8057,7 +8057,7 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
@@ -8087,9 +8087,9 @@ static void test_bezier_intersect(BOOL d3d11)
ok(match, "Figure does not match.\n");
hr = ID2D1Factory_CreatePathGeometry(factory, &geometry);
- ok(SUCCEEDED(hr), "Failed to create path geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(geometry, &sink);
- ok(SUCCEEDED(hr), "Failed to open geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&point, 240.0f, 720.0f);
ID2D1GeometrySink_BeginFigure(sink, point, D2D1_FIGURE_BEGIN_FILLED);
@@ -8100,14 +8100,14 @@ static void test_bezier_intersect(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_CLOSED);
hr = ID2D1GeometrySink_Close(sink);
- ok(SUCCEEDED(hr), "Failed to close geometry sink, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
ID2D1RenderTarget_BeginDraw(rt);
ID2D1RenderTarget_Clear(rt, &color);
ID2D1RenderTarget_FillGeometry(rt, (ID2D1Geometry *)geometry, (ID2D1Brush *)brush, NULL);
hr = ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1PathGeometry_Release(geometry);
match = compare_figure(&ctx, 160, 120, 320, 240, 0xff652e89, 2048,
@@ -8155,7 +8155,7 @@ static void test_create_device(BOOL d3d11)
}
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_GetFactory(device, &factory2);
ok(factory2 == (ID2D1Factory *)factory, "Got unexpected factory %p, expected %p.\n", factory2, factory);
@@ -8165,11 +8165,11 @@ static void test_create_device(BOOL d3d11)
if (pD2D1CreateDevice)
{
hr = pD2D1CreateDevice(ctx.device, NULL, &device);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
hr = pD2D1CreateDevice(ctx.device, &properties, &device);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
}
else
@@ -8178,7 +8178,7 @@ static void test_create_device(BOOL d3d11)
release_test_context(&ctx);
refcount = ID2D1Factory1_Release(factory);
- ok(!refcount, "Factory has %u references left.\n", refcount);
+ ok(!refcount, "Factory has %lu references left.\n", refcount);
}
#define check_rt_bitmap_surface(r, s, o) check_rt_bitmap_surface_(__LINE__, r, s, o)
@@ -8207,7 +8207,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
@@ -8216,19 +8216,19 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
/* Zero sized bitmaps. */
set_size_u(&size, 0, 0);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
set_size_u(&size, 2, 0);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
set_size_u(&size, 0, 2);
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
@@ -8237,15 +8237,15 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create WIC imaging factory, hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create WIC bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create WIC bitmap, hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
hr = ID2D1RenderTarget_CreateBitmapFromWicBitmap(rt, (IWICBitmapSource *)wic_bitmap, NULL, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap from WIC source, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap from WIC source, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
@@ -8255,7 +8255,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
/* Compatible target follows its parent. */
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get device context, hr %#lx.\n", hr);
dc_rt = NULL;
ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DCRenderTarget, (void **)&dc_rt);
@@ -8289,10 +8289,10 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &compatible_rt);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create compatible render target, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create compatible render target, hr %#lx.\n", hr);
hr = ID2D1BitmapRenderTarget_QueryInterface(compatible_rt, &IID_ID2D1DeviceContext, (void **)&context2);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get device context, hr %#lx.\n", hr);
ID2D1DeviceContext_GetDevice(context2, &device2);
ok_(__FILE__, line)(device == device2, "Unexpected device.\n");
@@ -8302,12 +8302,12 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
hr = ID2D1BitmapRenderTarget_CreateBitmap(compatible_rt, size,
bitmap_data, sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to create bitmap, hr %#lx.\n", hr);
check_bitmap_surface_(line, bitmap, has_surface, options);
ID2D1Bitmap_Release(bitmap);
hr = ID2D1BitmapRenderTarget_GetBitmap(compatible_rt, &bitmap);
- ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to get compatible target bitmap, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get compatible target bitmap, hr %#lx.\n", hr);
bitmap2 = NULL;
ID2D1DeviceContext_GetTarget(context2, (ID2D1Image **)&bitmap2);
@@ -8324,7 +8324,7 @@ static void check_rt_bitmap_surface_(unsigned int line, ID2D1RenderTarget *rt, B
{
hr = ID2D1RenderTarget_CreateCompatibleRenderTarget(rt, NULL, NULL, NULL,
D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &compatible_rt);
- ok_(__FILE__, line)(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, "Unexpected hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT, "Unexpected hr %#lx.\n", hr);
}
ID2D1DeviceContext_Release(context);
@@ -8355,13 +8355,13 @@ static IDXGISurface *create_surface(IDXGIDevice *dxgi_device, DXGI_FORMAT format
texture_desc.MiscFlags = 0;
hr = IDXGIDevice_QueryInterface(dxgi_device, &IID_ID3D10Device, (void **)&d3d_device);
- ok(SUCCEEDED(hr), "Failed to get device interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device_CreateTexture2D(d3d_device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create a texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get surface interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10Device_Release(d3d_device);
ID3D10Texture2D_Release(texture);
@@ -8428,7 +8428,7 @@ static void test_bitmap_surface(BOOL d3d11)
/* DXGI target */
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
bitmap = NULL;
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
@@ -8442,10 +8442,10 @@ static void test_bitmap_surface(BOOL d3d11)
/* Bitmap created from DXGI surface. */
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(bitmap_format_tests); ++i)
{
@@ -8455,7 +8455,7 @@ static void test_bitmap_surface(BOOL d3d11)
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
todo_wine_if(bitmap_format_tests[i].hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT)
- ok(hr == bitmap_format_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == bitmap_format_tests[i].hr, "%u: Got unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(bitmap_format_tests[i].hr))
{
@@ -8474,8 +8474,8 @@ static void test_bitmap_surface(BOOL d3d11)
surface2 = create_surface(ctx.device, DXGI_FORMAT_A8_UNORM);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, surface2, NULL, &bitmap);
- ok(SUCCEEDED(hr) || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
- "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK || broken(hr == WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT) /* Win7 */,
+ "Got unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
@@ -8489,7 +8489,7 @@ static void test_bitmap_surface(BOOL d3d11)
IDXGISurface_Release(surface2);
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, NULL, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
pixel_format = ID2D1Bitmap1_GetPixelFormat(bitmap);
ok(pixel_format.alphaMode == D2D1_ALPHA_MODE_PREMULTIPLIED,
@@ -8511,14 +8511,14 @@ static void test_bitmap_surface(BOOL d3d11)
bitmap_desc.pixelFormat = ID2D1DeviceContext_GetPixelFormat(device_context);
size.width = size.height = 4;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1DeviceContext_SetTags(device_context, 1, 2);
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
- ok(hr == D2DERR_INVALID_TARGET, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_TARGET, "Got unexpected hr %#lx.\n", hr);
ok(t1 == 1 && t2 == 2, "Unexpected tags %s:%s.\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2));
ID2D1Bitmap1_Release(bitmap);
@@ -8529,7 +8529,7 @@ static void test_bitmap_surface(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_bitmap_surface((ID2D1Bitmap *)bitmap, TRUE, D2D1_BITMAP_OPTIONS_TARGET);
ID2D1DeviceContext_SetTarget(device_context, NULL);
ID2D1DeviceContext_SetTags(device_context, 3, 4);
@@ -8537,7 +8537,7 @@ static void test_bitmap_surface(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, &t1, &t2);
- ok(SUCCEEDED(hr), "Failed to end draw, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!t1 && !t2, "Unexpected tags %s:%s.\n", wine_dbgstr_longlong(t1), wine_dbgstr_longlong(t2));
ID2D1Bitmap1_Release(bitmap);
@@ -8555,10 +8555,10 @@ static void test_bitmap_surface(BOOL d3d11)
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory1_CreateDCRenderTarget(factory, &rt_desc, (ID2D1DCRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
ok(!bitmap, "Unexpected target.\n");
@@ -8575,7 +8575,7 @@ static void test_bitmap_surface(BOOL d3d11)
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory1_CreateHwndRenderTarget(factory, &rt_desc, &hwnd_rt_desc, (ID2D1HwndRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_rt_bitmap_surface(rt, FALSE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1RenderTarget_Release(rt);
@@ -8586,14 +8586,14 @@ static void test_bitmap_surface(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
hr = ID2D1Factory1_CreateWicBitmapRenderTarget(factory, wic_bitmap, &rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_rt_bitmap_surface(rt, FALSE, D2D1_BITMAP_OPTIONS_NONE);
ID2D1RenderTarget_Release(rt);
@@ -8637,10 +8637,10 @@ static void test_device_context(BOOL d3d11)
}
hr = ID2D1Factory1_CreateDevice(factory, ctx.device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetDevice(device_context, &device2);
ok(device2 == device, "Unexpected device instance.\n");
@@ -8658,19 +8658,19 @@ static void test_device_context(BOOL d3d11)
/* DXGI target */
rt = ctx.rt;
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
- ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface2);
- ok(SUCCEEDED(hr), "Failed to get bitmap surface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(surface2 == ctx.surface, "Unexpected surface instance.\n");
IDXGISurface_Release(surface2);
ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
@@ -8687,10 +8687,10 @@ static void test_device_context(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(SUCCEEDED(hr), "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
IWICImagingFactory_Release(wic_factory);
rt_desc.type = D2D1_RENDER_TARGET_TYPE_DEFAULT;
@@ -8701,16 +8701,16 @@ static void test_device_context(BOOL d3d11)
rt_desc.usage = D2D1_RENDER_TARGET_USAGE_NONE;
rt_desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory1_CreateWicBitmapRenderTarget(factory, wic_bitmap, &rt_desc, &rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- todo_wine ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8731,16 +8731,16 @@ static void test_device_context(BOOL d3d11)
ok(!!hwnd_rt_desc.hwnd, "Failed to create target window.\n");
hr = ID2D1Factory1_CreateHwndRenderTarget(factory, &rt_desc, &hwnd_rt_desc, (ID2D1HwndRenderTarget **)&rt);
- ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_QueryInterface(rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- ok(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8753,10 +8753,10 @@ static void test_device_context(BOOL d3d11)
/* DC target */
hr = ID2D1Factory1_CreateDCRenderTarget(factory, &rt_desc, &dc_rt);
- ok(SUCCEEDED(hr), "Failed to create target, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DCRenderTarget_QueryInterface(dc_rt, &IID_ID2D1DeviceContext, (void **)&device_context);
- ok(SUCCEEDED(hr), "Failed to get device context interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
ok(bitmap == NULL, "Unexpected bitmap instance.\n");
@@ -8767,14 +8767,14 @@ static void test_device_context(BOOL d3d11)
SetRect(&rect, 0, 0, 16, 16);
hr = ID2D1DCRenderTarget_BindDC(dc_rt, hdc, &rect);
- ok(SUCCEEDED(hr), "BindDC() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, (ID2D1Image **)&bitmap);
options = ID2D1Bitmap1_GetOptions(bitmap);
ok(options == (D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW | D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE),
"Unexpected bitmap options %#x.\n", options);
hr = ID2D1Bitmap1_GetSurface(bitmap, &surface);
- ok(hr == D2DERR_INVALID_CALL, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap1_Release(bitmap);
ID2D1DeviceContext_SetTarget(device_context, NULL);
@@ -8918,10 +8918,10 @@ static ID2D1DeviceContext *create_device_context(ID2D1Factory1 *factory, IDXGIDe
HRESULT hr;
hr = ID2D1Factory1_CreateDevice(factory, dxgi_device, &device);
- ok(SUCCEEDED(hr), "Failed to get ID2D1Device, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Device_CreateDeviceContext(device, D2D1_DEVICE_CONTEXT_OPTIONS_NONE, &device_context);
- ok(SUCCEEDED(hr), "Failed to create device context, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Device_Release(device);
return device_context;
@@ -8975,7 +8975,7 @@ static void test_command_list(BOOL d3d11)
ok(device_context != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr))
{
@@ -8988,7 +8988,7 @@ static void test_command_list(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
hr = ID2D1DeviceContext_QueryInterface(device_context, &IID_ID2D1RenderTarget, (void **)&rt);
- ok(SUCCEEDED(hr), "Failed to get rt interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Test how resources are referenced by the list. */
@@ -8999,70 +8999,70 @@ static void test_command_list(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_DrawBitmap(rt, bitmap, NULL, 0.25f, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, NULL);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Solid color brush. */
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 16.0f, 16.0f);
ID2D1RenderTarget_FillRectangle(rt, &rect, brush);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
/* Bitmap brush. */
hr = ID2D1RenderTarget_CreateBitmap(rt, size, bitmap_data, 4 * sizeof(*bitmap_data), &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1RenderTarget_CreateBitmapBrush(rt, bitmap, NULL, NULL, (ID2D1BitmapBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create bitmap brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 16.0f, 16.0f);
ID2D1RenderTarget_FillRectangle(rt, &rect, brush);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Bitmap_Release(bitmap);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Linear gradient brush. */
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&linear_gradient_properties.startPoint, 320.0f, 0.0f);
set_point(&linear_gradient_properties.endPoint, 0.0f, 960.0f);
hr = ID2D1RenderTarget_CreateLinearGradientBrush(rt, &linear_gradient_properties, NULL, gradient,
(ID2D1LinearGradientBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Radial gradient brush. */
hr = ID2D1RenderTarget_CreateGradientStopCollection(rt, stops, ARRAY_SIZE(stops),
D2D1_GAMMA_2_2, D2D1_EXTEND_MODE_CLAMP, &gradient);
- ok(SUCCEEDED(hr), "Failed to create stop collection, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&radial_gradient_properties.center, 160.0f, 480.0f);
set_point(&radial_gradient_properties.gradientOriginOffset, 40.0f, -120.0f);
@@ -9070,39 +9070,39 @@ static void test_command_list(BOOL d3d11)
radial_gradient_properties.radiusY = 480.0f;
hr = ID2D1RenderTarget_CreateRadialGradientBrush(rt, &radial_gradient_properties, NULL, gradient,
(ID2D1RadialGradientBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1GradientStopCollection_Release(gradient);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Geometry. */
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory1_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometry);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1RenderTarget_FillGeometry(rt, geometry, brush, NULL);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1Geometry_Release(geometry);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Stroke style. */
stroke_desc.startCap = D2D1_CAP_STYLE_SQUARE;
@@ -9114,21 +9114,21 @@ static void test_command_list(BOOL d3d11)
stroke_desc.dashOffset = -1.0f;
hr = ID2D1Factory_CreateStrokeStyle((ID2D1Factory *)factory, &stroke_desc, NULL, 0, &stroke_style);
- ok(SUCCEEDED(hr), "Failed to create stroke style, %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_color(&color, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1RenderTarget_CreateSolidColorBrush(rt, &color, NULL, (ID2D1SolidColorBrush **)&brush);
- ok(SUCCEEDED(hr), "Failed to create a brush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_point(&p0, 100.0f, 160.0f);
set_point(&p1, 140.0f, 160.0f);
ID2D1RenderTarget_DrawLine(rt, p0, p1, brush, 1.0f, stroke_style);
refcount = ID2D1Brush_Release(brush);
- ok(refcount == 0, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 0, "Got unexpected refcount %lu.\n", refcount);
refcount = ID2D1StrokeStyle_Release(stroke_style);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
/* Close on attached list. */
ID2D1DeviceContext_GetTarget(device_context, &target);
@@ -9136,22 +9136,22 @@ static void test_command_list(BOOL d3d11)
ID2D1Image_Release(target);
hr = ID2D1CommandList_Close(command_list);
- ok(SUCCEEDED(hr), "Failed to close a list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_GetTarget(device_context, &target);
ok(target == NULL, "Unexpected context target.\n");
hr = ID2D1CommandList_Close(command_list);
- ok(hr == D2DERR_WRONG_STATE, "Unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_WRONG_STATE, "Got unexpected hr %#lx.\n", hr);
ID2D1CommandList_Release(command_list);
/* Close empty list. */
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1CommandList_Close(command_list);
- ok(SUCCEEDED(hr), "Failed to close a list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1CommandList_Release(command_list);
@@ -9160,7 +9160,7 @@ static void test_command_list(BOOL d3d11)
ok(device_context2 != NULL, "Failed to create device context.\n");
hr = ID2D1DeviceContext_CreateCommandList(device_context, &command_list);
- ok(SUCCEEDED(hr), "Failed to create command list, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1DeviceContext_SetTarget(device_context2, (ID2D1Image *)command_list);
ID2D1DeviceContext_GetTarget(device_context2, &target);
@@ -9213,21 +9213,21 @@ static void test_max_bitmap_size(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(device_types); ++i)
{
if (FAILED(hr = D3D10CreateDevice1(NULL, device_types[i].type, NULL, D3D10_CREATE_DEVICE_BGRA_SUPPORT,
D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &device)))
{
- skip("Failed to create %s d3d device, hr %#x.\n", device_types[i].name, hr);
+ skip("Failed to create %s d3d device, hr %#lx.\n", device_types[i].name, hr);
continue;
}
window = create_window();
swapchain = create_d3d10_swapchain(device, window, TRUE);
hr = IDXGISwapChain_GetBuffer(swapchain, 0, &IID_IDXGISurface, (void **)&surface);
- ok(SUCCEEDED(hr), "Failed to get buffer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (j = 0; j < ARRAY_SIZE(target_types); ++j)
{
@@ -9244,8 +9244,7 @@ static void test_max_bitmap_size(BOOL d3d11)
desc.minLevel = D2D1_FEATURE_LEVEL_DEFAULT;
hr = ID2D1Factory_CreateDxgiSurfaceRenderTarget(factory, surface, &desc, &rt);
- ok(SUCCEEDED(hr), "%s/%s: failed to create render target, hr %#x.\n", device_types[i].name,
- target_types[j].name, hr);
+ ok(hr == S_OK, "%s/%s: Got unexpected hr %#lx.\n", device_types[i].name, target_types[j].name, hr);
bitmap_size = ID2D1RenderTarget_GetMaximumBitmapSize(rt);
ok(bitmap_size >= D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION, "%s/%s: unexpected bitmap size %u.\n",
@@ -9259,7 +9258,7 @@ static void test_max_bitmap_size(BOOL d3d11)
size.width = bitmap_size;
size.height = 1;
hr = ID2D1RenderTarget_CreateBitmap(rt, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(SUCCEEDED(hr), "Failed to create a bitmap, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Bitmap_Release(bitmap);
ID2D1RenderTarget_Release(rt);
@@ -9277,8 +9276,8 @@ static void test_max_bitmap_size(BOOL d3d11)
texture_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr) || broken(hr == E_INVALIDARG && device_types[i].type == D3D10_DRIVER_TYPE_WARP) /* Vista */,
- "%s/%s: failed to create texture, hr %#x.\n", device_types[i].name, target_types[j].name, hr);
+ ok(hr == S_OK || broken(hr == E_INVALIDARG && device_types[i].type == D3D10_DRIVER_TYPE_WARP) /* Vista */,
+ "%s/%s: Got unexpected hr %#lx.\n", device_types[i].name, target_types[j].name, hr);
if (SUCCEEDED(hr))
ID3D10Texture2D_Release(texture);
}
@@ -9355,7 +9354,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmapFromDxgiSurface(device_context, ctx.surface, &bitmap_desc, &bitmap);
/* Native accepts negative DPI values for DXGI surface bitmap. */
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
ID2D1DeviceContext_SetDpi(device_context, dc_dpi_x, dc_dpi_y);
@@ -9370,7 +9369,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9384,7 +9383,7 @@ static void test_dpi(BOOL d3d11)
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(create_dpi_tests); ++i)
{
IWICBitmapSource *wic_bitmap_src;
@@ -9394,9 +9393,9 @@ static void test_dpi(BOOL d3d11)
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
&GUID_WICPixelFormat32bppPBGRA, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
hr = IWICBitmap_QueryInterface(wic_bitmap, &IID_IWICBitmapSource, (void **)&wic_bitmap_src);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
IWICBitmap_Release(wic_bitmap);
bitmap_desc.pixelFormat.format = DXGI_FORMAT_UNKNOWN;
@@ -9406,7 +9405,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmapFromWicBitmap(device_context, wic_bitmap_src, &bitmap_desc, &bitmap);
- ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n",
i, hr, create_dpi_tests[i].hr);
IWICBitmapSource_Release(wic_bitmap_src);
@@ -9433,7 +9432,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9459,7 +9458,7 @@ static void test_dpi(BOOL d3d11)
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(device_context, size, NULL, 0, &bitmap_desc, &bitmap);
- ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+ ok(hr == create_dpi_tests[i].hr, "Test %u: Got unexpected hr %#lx, expected %#lx.\n",
i, hr, create_dpi_tests[i].hr);
if (FAILED(hr))
@@ -9485,7 +9484,7 @@ static void test_dpi(BOOL d3d11)
ID2D1DeviceContext_BeginDraw(device_context);
ID2D1DeviceContext_SetTarget(device_context, (ID2D1Image *)bitmap);
hr = ID2D1DeviceContext_EndDraw(device_context, NULL, NULL);
- ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
+ ok(hr == S_OK, "Test %u: Got unexpected hr %#lx.\n", i, hr);
/* Device context DPI values aren't updated by SetTarget. */
ID2D1DeviceContext_GetDpi(device_context, &dpi_x, &dpi_y);
@@ -9536,16 +9535,16 @@ static void test_wic_bitmap_format(BOOL d3d11)
hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
&IID_IWICImagingFactory, (void **)&wic_factory);
- ok(hr == S_OK, "Failed to create WIC imaging factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IWICImagingFactory_CreateBitmap(wic_factory, 16, 16,
tests[i].wic, WICBitmapCacheOnDemand, &wic_bitmap);
- ok(hr == S_OK, "%s: Failed to create WIC bitmap, hr %#x.\n", debugstr_guid(tests[i].wic), hr);
+ ok(hr == S_OK, "%s: Got unexpected hr %#lx.\n", debugstr_guid(tests[i].wic), hr);
hr = ID2D1RenderTarget_CreateBitmapFromWicBitmap(rt, (IWICBitmapSource *)wic_bitmap, NULL, &bitmap);
- ok(hr == S_OK, "%s: Failed to create bitmap from WIC source, hr %#x.\n", debugstr_guid(tests[i].wic), hr);
+ ok(hr == S_OK, "%s: Got unexpected hr %#lx.\n", debugstr_guid(tests[i].wic), hr);
format = ID2D1Bitmap_GetPixelFormat(bitmap);
ok(format.format == tests[i].d2d.format, "%s: Got unexpected DXGI format %#x.\n",
@@ -9740,22 +9739,22 @@ static void test_geometry_group(BOOL d3d11)
BOOL match;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -1.0f, -1.0f, 1.0f, 1.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometries[0]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, -2.0f, -2.0f, 0.0f, 2.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, (ID2D1RectangleGeometry **)&geometries[1]);
- ok(SUCCEEDED(hr), "Failed to create geometry, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_CreateGeometryGroup(factory, D2D1_FILL_MODE_ALTERNATE, geometries, 2, &group);
- ok(SUCCEEDED(hr), "Failed to create geometry group, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 0.0f, 0.0f);
hr = ID2D1GeometryGroup_GetBounds(group, NULL, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry group bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, -2.0f, -2.0f, 1.0f, 2.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -9764,7 +9763,7 @@ static void test_geometry_group(BOOL d3d11)
translate_matrix(&matrix, 80.0f, 640.0f);
scale_matrix(&matrix, 2.0f, 0.5f);
hr = ID2D1GeometryGroup_GetBounds(group, &matrix, &rect);
- ok(SUCCEEDED(hr), "Failed to get geometry group bounds, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
match = compare_rect(&rect, 76.0f, 639.0f, 82.0f, 641.0f, 0);
ok(match, "Got unexpected rectangle {%.8e, %.8e, %.8e, %.8e}.\n",
rect.left, rect.top, rect.right, rect.bottom);
@@ -9795,10 +9794,10 @@ static void test_mt_factory(BOOL d3d11)
DWORD ret;
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED + 1, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_QueryInterface(factory, &IID_ID2D1Multithread, (void **)&multithread);
if (hr == E_NOINTERFACE)
@@ -9807,7 +9806,7 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Factory_Release(factory);
return;
}
- ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = ID2D1Multithread_GetMultithreadProtected(multithread);
ok(!ret, "Unexpected return value.\n");
@@ -9822,10 +9821,10 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Factory_Release(factory);
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(SUCCEEDED(hr), "Failed to create factory, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Factory_QueryInterface(factory, &IID_ID2D1Multithread, (void **)&multithread);
- ok(SUCCEEDED(hr), "Failed to get interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = ID2D1Multithread_GetMultithreadProtected(multithread);
ok(!!ret, "Unexpected return value.\n");
@@ -9887,7 +9886,7 @@ static void test_effect(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(effect_tests); ++i)
{
@@ -9896,82 +9895,74 @@ static void test_effect(BOOL d3d11)
winetest_push_context("Test %u", i);
hr = ID2D1DeviceContext_CreateEffect(context, test->clsid, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_QueryInterface(effect, &IID_ID2D1Image, (void **)&image_a);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &image_b);
ok(image_b == image_a, "Got unexpected image_b %p, expected %p.\n", image_b, image_a);
ID2D1Image_Release(image_b);
ID2D1Image_Release(image_a);
hr = ID2D1Effect_GetValue(effect, 0xdeadbeef, D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid) + 1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid) - 1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_CLSID, buffer, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, sizeof(buffer));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
str_size = (wcslen((WCHAR *)buffer) + 1) * sizeof(WCHAR);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size);
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size - 1);
- todo_wine
- ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, 0xdeadbeef, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_UNKNOWN, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_VECTOR4, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, D2D1_PROPERTY_TYPE_VECTOR4, buffer, sizeof(buffer));
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID,
D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(IsEqualGUID(&clsid, test->clsid), "Got unexpected clsid %s, expected %s.\n",
- debugstr_guid(&clsid), debugstr_guid(test->clsid));
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(IsEqualGUID(&clsid, test->clsid), "Got unexpected clsid %s, expected %s.\n",
+ debugstr_guid(&clsid), debugstr_guid(test->clsid));
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CACHED,
D2D1_PROPERTY_TYPE_BOOL, (BYTE *)&cached, sizeof(cached));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(cached == FALSE, "Got unexpected cached %d.\n", cached);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_PRECISION,
D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision));
- todo_wine
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %u.\n", precision);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
- min_inputs, test->min_inputs);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
+ min_inputs, test->min_inputs);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&max_inputs, sizeof(max_inputs));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
- if (hr == S_OK)
- ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
- max_inputs, test->max_inputs);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
+ ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
+ max_inputs, test->max_inputs);
input_count = ID2D1Effect_GetInputCount(effect);
- ok (input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
+ ok(input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
input_count, test->default_input_count);
input_count = (test->max_inputs < 16 ? test->max_inputs : 16);
@@ -9980,9 +9971,9 @@ static void test_effect(BOOL d3d11)
winetest_push_context("Input %u", j);
hr = ID2D1Effect_SetInputCount(effect, j);
if (j < test->min_inputs || j > test->max_inputs)
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
else
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
winetest_pop_context();
}
@@ -10001,7 +9992,7 @@ static void test_effect(BOOL d3d11)
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
hr = ID2D1RenderTarget_CreateBitmap(ctx.rt, size, NULL, 4, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
for (j = 0; j < input_count + 4; ++j)
@@ -10120,10 +10111,10 @@ static void test_effect_2d_affine(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D12DAffineTransform, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(effect_2d_affine_tests); ++i)
{
@@ -10139,13 +10130,13 @@ static void test_effect_2d_affine(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, test->img_data,
sizeof(*test->img_data) * test->img_width, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
todo_wine
hr = ID2D1Effect_SetValue(effect, D2D1_2DAFFINETRANSFORM_PROP_TRANSFORM_MATRIX,
D2D1_PROPERTY_TYPE_MATRIX_3X2, (const BYTE *)test->matrix, sizeof(*test->matrix));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &output);
ID2D1DeviceContext_GetImageLocalBounds(context, output, &output_bounds);
@@ -10168,7 +10159,7 @@ static void test_effect_2d_affine(BOOL d3d11)
offset.y = 240.0f;
ID2D1DeviceContext_DrawImage(context, output, &offset, NULL, 0, 0);
hr = ID2D1DeviceContext_EndDraw(context, NULL, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
x = offset.x + output_bounds.left - 2.0f;
y = offset.y + output_bounds.top - 2.0f;
@@ -10232,10 +10223,10 @@ static void test_effect_crop(BOOL d3d11)
}
hr = ID2D1RenderTarget_QueryInterface(ctx.rt, &IID_ID2D1DeviceContext, (void **)&context);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D1Crop, &effect);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(crop_effect_tests); ++i)
{
@@ -10251,12 +10242,12 @@ static void test_effect_crop(BOOL d3d11)
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, image,
sizeof(*image) * 16, &bitmap_desc, &bitmap);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
hr = ID2D1Effect_SetValue(effect, D2D1_CROP_PROP_RECT, D2D1_PROPERTY_TYPE_VECTOR4,
(const BYTE *)&test->crop_rect, sizeof(test->crop_rect));
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_GetOutput(effect, &output);
set_rect(&output_bounds, -1.0f, -1.0f, -1.0f, -1.0f);
@@ -10458,11 +10449,11 @@ static void test_stroke_contains_point(BOOL d3d11)
};
hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &IID_ID2D1Factory, NULL, (void **)&factory);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
set_rect(&rect, 0.0f, 0.0f, 10.0f, 20.0f);
hr = ID2D1Factory_CreateRectangleGeometry(factory, &rect, &rectangle);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(rectangle_tests); ++i)
{
const struct contains_point_test *test = &rectangle_tests[i];
@@ -10472,7 +10463,7 @@ static void test_stroke_contains_point(BOOL d3d11)
contains = !test->contains;
hr = ID2D1RectangleGeometry_StrokeContainsPoint(rectangle, test->point, test->stroke_width,
NULL, test->matrix ? &test->transform : NULL, test->tolerance, &contains);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == test->contains, "Got unexpected result %#x.\n", contains);
winetest_pop_context();
@@ -10480,9 +10471,9 @@ static void test_stroke_contains_point(BOOL d3d11)
ID2D1RectangleGeometry_Release(rectangle);
hr = ID2D1Factory_CreatePathGeometry(factory, &path);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1PathGeometry_Open(path, &sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* A limaçon. */
set_point(&point, 160.0f, 720.0f);
@@ -10524,7 +10515,7 @@ static void test_stroke_contains_point(BOOL d3d11)
ID2D1GeometrySink_EndFigure(sink, D2D1_FIGURE_END_OPEN);
hr = ID2D1GeometrySink_Close(sink);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1GeometrySink_Release(sink);
for (i = 0; i < ARRAY_SIZE(path_tests); ++i)
@@ -10536,7 +10527,7 @@ static void test_stroke_contains_point(BOOL d3d11)
contains = !test->contains;
hr = ID2D1PathGeometry_StrokeContainsPoint(path, test->point, test->stroke_width,
NULL, test->matrix ? &test->transform : NULL, test->tolerance, &contains);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(contains == test->contains, "Got unexpected result %#x.\n", contains);
winetest_pop_context();
--
2.30.2
2
1
[PATCH 3/5] d2d1/tests: Declare "level" as D3D_FEATURE_LEVEL in create_d3d11_device().
by Henri Verbeet Feb. 3, 2022
by Henri Verbeet Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 314d8b7ce60d..003aad605054 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -824,7 +824,7 @@ static ID3D10Device1 *create_d3d10_device(void)
static ID3D11Device *create_d3d11_device(void)
{
- DWORD level = D3D_FEATURE_LEVEL_11_0;
+ D3D_FEATURE_LEVEL level = D3D_FEATURE_LEVEL_11_0;
ID3D11Device *device;
if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL,
--
2.30.2
2
1
[PATCH 2/5] d2d1/tests: Pass the hash size as DWORD in compare_sha1().
by Henri Verbeet Feb. 3, 2022
by Henri Verbeet Feb. 3, 2022
Feb. 3, 2022
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index b0aa02ad2a90..314d8b7ce60d 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -536,6 +536,7 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
HCRYPTPROV provider;
BYTE hash_data[20];
HCRYPTHASH hash;
+ DWORD hash_size;
unsigned int i;
char sha1[41];
BOOL ret;
@@ -552,10 +553,10 @@ static BOOL compare_sha1(void *data, unsigned int pitch, unsigned int bpp,
}
ok(ret, "Failed to hash data.\n");
- i = sizeof(hash_data);
- ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &i, 0);
+ hash_size = sizeof(hash_data);
+ ret = CryptGetHashParam(hash, HP_HASHVAL, hash_data, &hash_size, 0);
ok(ret, "Failed to get hash value.\n");
- ok(i == sizeof(hash_data), "Got unexpected hash size %u.\n", i);
+ ok(hash_size == sizeof(hash_data), "Got unexpected hash size %u.\n", hash_size);
ret = CryptDestroyHash(hash);
ok(ret, "Failed to destroy hash.\n");
--
2.30.2
2
1
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3d10_1/tests/Makefile.in | 1 -
dlls/d3d10_1/tests/d3d10_1.c | 104 ++++++++++++++++-----------------
2 files changed, 52 insertions(+), 53 deletions(-)
diff --git a/dlls/d3d10_1/tests/Makefile.in b/dlls/d3d10_1/tests/Makefile.in
index 97eaf324ff78..256bb407d414 100644
--- a/dlls/d3d10_1/tests/Makefile.in
+++ b/dlls/d3d10_1/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3d10_1.dll
IMPORTS = d3d10_1 user32
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index 51da614d9d76..33abd919a031 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -87,7 +87,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID iid, BOOL
hr = IUnknown_QueryInterface(unknown, iid, (void **)&out);
ok_(__FILE__, line)(hr == expected_hr || broken(is_broken && hr == broken_hr),
- "Got hr %#x, expected %#x.\n", hr, expected_hr);
+ "Got unexpected hr %#lx, expected %#lx.\n", hr, expected_hr);
if (SUCCEEDED(hr))
IUnknown_Release(out);
return hr;
@@ -128,18 +128,18 @@ static void test_create_device(void)
hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDevice1(NULL, 0xffffffff, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &device);
- todo_wine ok(hr == E_INVALIDARG, "D3D10CreateDevice1 returned %#x.\n", hr);
+ todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!device, "Got unexpected device pointer %p.\n", device);
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
0, D3D10_1_SDK_VERSION, &device);
- ok(hr == E_INVALIDARG, "D3D10CreateDevice1 returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!device, "Got unexpected device pointer %p.\n", device);
window = CreateWindowA("static", "d3d10_1_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -162,13 +162,13 @@ static void test_create_device(void)
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_interface(swapchain, &IID_IDXGISwapChain1, TRUE, FALSE);
memset(&obtained_desc, 0, sizeof(obtained_desc));
hr = IDXGISwapChain_GetDesc(swapchain, &obtained_desc);
- ok(SUCCEEDED(hr), "GetDesc failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(obtained_desc.BufferDesc.Width == swapchain_desc.BufferDesc.Width,
"Got unexpected BufferDesc.Width %u.\n", obtained_desc.BufferDesc.Width);
ok(obtained_desc.BufferDesc.Height == swapchain_desc.BufferDesc.Height,
@@ -203,56 +203,56 @@ static void test_create_device(void)
"Got unexpected Flags %#x.\n", obtained_desc.Flags);
refcount = IDXGISwapChain_Release(swapchain);
- ok(!refcount, "Swapchain has %u references left.\n", refcount);
+ ok(!refcount, "Swapchain has %lu references left.\n", refcount);
feature_level = ID3D10Device1_GetFeatureLevel(device);
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL, NULL, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, NULL, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
0, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
swapchain = (IDXGISwapChain *)0xdeadbeef;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, NULL);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
swapchain_desc.OutputWindow = NULL;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, NULL, &device);
- ok(SUCCEEDED(hr), "D3D10CreateDeviceAndSwapChain1 failed %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
swapchain = (IDXGISwapChain *)0xdeadbeef;
device = (ID3D10Device1 *)0xdeadbeef;
swapchain_desc.OutputWindow = NULL;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == DXGI_ERROR_INVALID_CALL, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
+ ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
@@ -262,7 +262,7 @@ static void test_create_device(void)
swapchain_desc.BufferDesc.Format = DXGI_FORMAT_BC5_UNORM;
hr = D3D10CreateDeviceAndSwapChain1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0,
supported_feature_level, D3D10_1_SDK_VERSION, &swapchain_desc, &swapchain, &device);
- ok(hr == E_INVALIDARG, "D3D10CreateDeviceAndSwapChain1 returned %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ok(!swapchain, "Got unexpected swapchain pointer %p.\n", swapchain);
ok(!device, "Got unexpected device pointer %p.\n", device);
@@ -317,7 +317,7 @@ static void test_device_interfaces(void)
IDXGIDevice_Release(dxgi_device);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
for (i = 0; i < ARRAY_SIZE(d3d10_feature_levels); ++i)
@@ -336,7 +336,7 @@ static void test_device_interfaces(void)
check_interface(device, &IID_ID3D10InfoQueue, TRUE, FALSE);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
}
@@ -366,10 +366,10 @@ static void test_create_shader_resource_view(void)
buffer_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
- ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, NULL, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
srv_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
srv_desc.ViewDimension = D3D10_1_SRV_DIMENSION_BUFFER;
@@ -377,19 +377,19 @@ static void test_create_shader_resource_view(void)
U(srv_desc).Buffer.ElementWidth = 64;
hr = ID3D10Device1_CreateShaderResourceView1(device, NULL, &srv_desc, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
expected_refcount = get_refcount((IUnknown *)device) + 1;
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
- ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
refcount = get_refcount((IUnknown *)device);
- ok(refcount >= expected_refcount, "Got unexpected refcount %u, expected >= %u.\n", refcount, expected_refcount);
+ ok(refcount >= expected_refcount, "Got unexpected refcount %lu, expected >= %lu.\n", refcount, expected_refcount);
tmp_device = NULL;
expected_refcount = refcount + 1;
ID3D10ShaderResourceView1_GetDevice(srview, &tmp_device);
ok(tmp_device == (ID3D10Device *)device, "Got unexpected device %p, expected %p.\n", tmp_device, device);
refcount = get_refcount((IUnknown *)device);
- ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
+ ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp_device);
check_interface(srview, &IID_ID3D10ShaderResourceView, TRUE, FALSE);
@@ -407,10 +407,10 @@ static void test_create_shader_resource_view(void)
buffer_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
- ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
ID3D10Buffer_Release(buffer);
@@ -427,10 +427,10 @@ static void test_create_shader_resource_view(void)
texture_desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &texture_desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)texture, NULL, &srview);
- ok(SUCCEEDED(hr), "Failed to create a shader resource view, hr %#x\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10ShaderResourceView1_GetDesc1(srview, &srv_desc);
ok(srv_desc.Format == texture_desc.Format, "Got unexpected format %#x.\n", srv_desc.Format);
@@ -448,7 +448,7 @@ static void test_create_shader_resource_view(void)
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_create_blend_state(void)
@@ -557,7 +557,7 @@ static void test_create_blend_state(void)
}
hr = ID3D10Device1_CreateBlendState1(device, NULL, &blend_state1);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
memset(&desc, 0, sizeof(desc));
desc.AlphaToCoverageEnable = FALSE;
@@ -573,18 +573,18 @@ static void test_create_blend_state(void)
expected_refcount = get_refcount((IUnknown *)device) + 1;
hr = ID3D10Device1_CreateBlendState1(device, &desc, &blend_state1);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Device1_CreateBlendState1(device, &desc, &blend_state2);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(blend_state1 == blend_state2, "Got different blend state objects.\n");
refcount = get_refcount((IUnknown *)device);
- ok(refcount >= expected_refcount, "Got unexpected refcount %u, expected >= %u.\n", refcount, expected_refcount);
+ ok(refcount >= expected_refcount, "Got unexpected refcount %lu, expected >= %lu.\n", refcount, expected_refcount);
tmp = NULL;
expected_refcount = refcount + 1;
ID3D10BlendState1_GetDevice(blend_state1, &tmp);
ok(tmp == (ID3D10Device *)device, "Got unexpected device %p, expected %p.\n", tmp, device);
refcount = get_refcount((IUnknown *)device);
- ok(refcount == expected_refcount, "Got unexpected refcount %u, expected %u.\n", refcount, expected_refcount);
+ ok(refcount == expected_refcount, "Got unexpected refcount %lu, expected %lu.\n", refcount, expected_refcount);
ID3D10Device_Release(tmp);
ID3D10BlendState1_GetDesc1(blend_state1, &obtained_desc);
@@ -625,16 +625,16 @@ static void test_create_blend_state(void)
check_interface(blend_state1, &IID_ID3D11BlendState, TRUE, TRUE);
refcount = ID3D10BlendState1_Release(blend_state1);
- ok(refcount == 1, "Got unexpected refcount %u.\n", refcount);
+ ok(refcount == 1, "Got unexpected refcount %lu.\n", refcount);
refcount = ID3D10BlendState1_Release(blend_state2);
- ok(!refcount, "Blend state has %u references left.\n", refcount);
+ ok(!refcount, "Blend state has %lu references left.\n", refcount);
for (i = 0; i < ARRAY_SIZE(desc_conversion_tests); ++i)
{
const D3D10_BLEND_DESC1 *current_desc = &desc_conversion_tests[i];
hr = ID3D10Device1_CreateBlendState1(device, current_desc, &blend_state1);
- ok(SUCCEEDED(hr), "Failed to create blend state, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10BlendState1_QueryInterface(blend_state1, &IID_ID3D10BlendState, (void **)&d3d10_blend_state);
ok(SUCCEEDED(hr), "Blend state should implement ID3D10BlendState.\n");
@@ -669,11 +669,11 @@ static void test_create_blend_state(void)
ID3D10BlendState_Release(d3d10_blend_state);
refcount = ID3D10BlendState1_Release(blend_state1);
- ok(!refcount, "Got unexpected refcount %u.\n", refcount);
+ ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
}
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_getdc(void)
@@ -708,47 +708,47 @@ static void test_getdc(void)
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
hr = ID3D10Device1_CreateTexture2D(device, &desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface1, (void**)&surface1);
- ok(SUCCEEDED(hr), "Failed to get IDXGISurface1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
IDXGISurface1_Release(surface1);
ID3D10Texture2D_Release(texture);
desc.MiscFlags = D3D10_RESOURCE_MISC_GDI_COMPATIBLE;
hr = ID3D10Device1_CreateTexture2D(device, &desc, NULL, &texture);
- ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface1, (void**)&surface1);
- ok(SUCCEEDED(hr), "Failed to get IDXGISurface1 interface, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- ok(SUCCEEDED(hr), "Failed to get DC, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* One more time. */
dc = (HDC)0xdeadbeef;
hr = IDXGISurface1_GetDC(surface1, FALSE, &dc);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
ok(dc == (HDC)0xdeadbeef, "Got unexpected dc %p.\n", dc);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- ok(SUCCEEDED(hr), "Failed to release DC, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDXGISurface1_ReleaseDC(surface1, NULL);
- todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#lx.\n", hr);
IDXGISurface1_Release(surface1);
ID3D10Texture2D_Release(texture);
refcount = ID3D10Device1_Release(device);
- ok(!refcount, "Device has %u references left.\n", refcount);
+ ok(!refcount, "Device has %lu references left.\n", refcount);
}
START_TEST(d3d10_1)
--
2.30.2
1
0
Feb. 3, 2022
From: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/d3dx11_42/tests/Makefile.in | 1 -
dlls/d3dx11_43/tests/Makefile.in | 1 -
dlls/d3dx11_43/tests/d3dx11.c | 145 ++++++++++++++++---------------
3 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/dlls/d3dx11_42/tests/Makefile.in b/dlls/d3dx11_42/tests/Makefile.in
index a4ea6f1a0277..660f6d947cce 100644
--- a/dlls/d3dx11_42/tests/Makefile.in
+++ b/dlls/d3dx11_42/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dx11_42.dll
IMPORTS = d3dx11_42
PARENTSRC = ../../d3dx11_43/tests
diff --git a/dlls/d3dx11_43/tests/Makefile.in b/dlls/d3dx11_43/tests/Makefile.in
index 11bb7763a01b..6e522df66fb9 100644
--- a/dlls/d3dx11_43/tests/Makefile.in
+++ b/dlls/d3dx11_43/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = d3dx11_43.dll
IMPORTS = d3dx11
diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c
index fe33089a5414..89fc0721c922 100644
--- a/dlls/d3dx11_43/tests/d3dx11.c
+++ b/dlls/d3dx11_43/tests/d3dx11.c
@@ -316,42 +316,42 @@ static void test_D3DX11CreateAsyncMemoryLoader(void)
void *ptr;
hr = D3DX11CreateAsyncMemoryLoader(NULL, 0, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncMemoryLoader(NULL, 0, &loader);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncMemoryLoader(&data, 0, &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
size = 100;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr == &data, "Got data pointer %p, original %p.\n", ptr, &data);
ok(!size, "Got unexpected data size.\n");
/* Load() is no-op. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
data = 0;
hr = D3DX11CreateAsyncMemoryLoader(&data, sizeof(data), &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Load() is no-op. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr == &data, "Got data pointer %p, original %p.\n", ptr, &data);
ok(size == sizeof(data), "Got unexpected data size.\n");
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
}
static void create_testfile(WCHAR *path, const void *data, int data_len)
@@ -364,7 +364,7 @@ static void create_testfile(WCHAR *path, const void *data, int data_len)
lstrcatW(path, L"asyncloader.data");
file = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0);
- ok(file != INVALID_HANDLE_VALUE, "Test file creation failed, at %s, error %d.\n",
+ ok(file != INVALID_HANDLE_VALUE, "Test file creation failed, at %s, error %ld.\n",
wine_dbgstr_w(path), GetLastError());
ret = WriteFile(file, data, data_len, &written, NULL);
@@ -385,59 +385,59 @@ static void test_D3DX11CreateAsyncFileLoader(void)
BOOL ret;
hr = D3DX11CreateAsyncFileLoaderA(NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncFileLoaderA(NULL, &loader);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncFileLoaderA("nonexistentfilename", &loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = ID3DX11DataLoader_Destroy(loader);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Test file sharing using dummy empty file. */
create_testfile(path, test_data1, sizeof(test_data1));
hr = D3DX11CreateAsyncFileLoaderW(path, &loader);
- ok(SUCCEEDED(hr), "Failed to create file loader, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
/* File was removed before Load(). */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Load() returned unexpected result, hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Create it again. */
create_testfile(path, test_data1, sizeof(test_data1));
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Already loaded. */
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
/* Already loaded, file removed. */
hr = ID3DX11DataLoader_Load(loader);
- ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Load() returned unexpected result, hr %#x.\n", hr);
+ ok(hr == D3D11_ERROR_FILE_NOT_FOUND, "Got unexpected hr %#lx.\n", hr);
/* Decompress still works. */
ptr = NULL;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(SUCCEEDED(hr), "Decompress() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr);
ok(size == sizeof(test_data1), "Got unexpected decompressed size.\n");
if (size == sizeof(test_data1))
@@ -447,21 +447,21 @@ static void test_D3DX11CreateAsyncFileLoader(void)
create_testfile(path, test_data2, sizeof(test_data2));
hr = ID3DX11DataLoader_Load(loader);
- ok(SUCCEEDED(hr), "Load() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ptr = NULL;
hr = ID3DX11DataLoader_Decompress(loader, &ptr, &size);
- ok(SUCCEEDED(hr), "Decompress() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(ptr != NULL, "Got unexpected ptr %p.\n", ptr);
ok(size == sizeof(test_data2), "Got unexpected decompressed size.\n");
if (size == sizeof(test_data2))
ok(!memcmp(ptr, test_data2, size), "Got unexpected file data.\n");
hr = ID3DX11DataLoader_Destroy(loader);
- ok(SUCCEEDED(hr), "Destroy() failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile() failed, ret %d, error %d.\n", ret, GetLastError());
+ ok(ret, "Got unexpected ret %#x, error %ld.\n", ret, GetLastError());
}
static void test_D3DX11CreateAsyncResourceLoader(void)
@@ -470,22 +470,22 @@ static void test_D3DX11CreateAsyncResourceLoader(void)
HRESULT hr;
hr = D3DX11CreateAsyncResourceLoaderA(NULL, NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderA(NULL, NULL, &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderA(NULL, "noname", &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, NULL, NULL);
- ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, NULL, &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
hr = D3DX11CreateAsyncResourceLoaderW(NULL, L"noname", &loader);
- ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3DX11_ERR_INVALID_DATA, "Got unexpected hr %#lx.\n", hr);
}
static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE include_type,
@@ -574,8 +574,9 @@ static void test_D3DX11CompileFromFile(void)
create_file(L"include1.h", include1, strlen(include1), NULL);
create_file(L"include\\include2.h", include2, strlen(include2), NULL);
- hr = D3DX11CompileFromFileW(filename, NULL, &include.ID3DInclude_iface, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ hr = D3DX11CompileFromFileW(filename, NULL, &include.ID3DInclude_iface,
+ "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -588,7 +589,7 @@ static void test_D3DX11CompileFromFile(void)
* instead of using the immediate parent, as it would be the case for
* standard C preprocessor includes. */
hr = D3DX11CompileFromFileW(filename, NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -600,7 +601,7 @@ static void test_D3DX11CompileFromFile(void)
len = WideCharToMultiByte(CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL);
WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, len, NULL, NULL);
hr = D3DX11CompileFromFileA(filename_a, NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -613,7 +614,7 @@ static void test_D3DX11CompileFromFile(void)
SetCurrentDirectoryW(temp_dir);
hr = D3DX11CompileFromFileW(L"source.ps", NULL, NULL, "main", "ps_2_0", 0, 0, NULL, &blob, &errors, &result);
- todo_wine ok(hr == S_OK && hr == result, "Got hr %#x, result %#x.\n", hr, result);
+ todo_wine ok(hr == S_OK && hr == result, "Got unexpected hr %#lx, result %#lx.\n", hr, result);
todo_wine ok(!!blob, "Got unexpected blob.\n");
ok(!errors, "Got unexpected errors.\n");
if (blob)
@@ -730,7 +731,7 @@ static void check_dds_pixel_format_(unsigned int line, DWORD flags, DWORD fourcc
memset(dds.data, 0, sizeof(dds.data));
hr = D3DX11GetImageInfoFromMemory(&dds, sizeof(dds), NULL, &info, NULL);
- ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#x for pixel format %#x.\n", hr, expected_format);
+ ok_(__FILE__, line)(hr == S_OK, "Got unexpected hr %#lx for pixel format %#x.\n", hr, expected_format);
if (SUCCEEDED(hr))
{
ok_(__FILE__, line)(info.Format == expected_format, "Unexpected format %#x, expected %#x\n",
@@ -750,50 +751,50 @@ static void test_D3DX11GetImageInfoFromMemory(void)
}
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp) + 5, NULL, &info, NULL); /* too large size */
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, sizeof(noimage), NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, sizeof(noimage), NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp) - 1, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp + 1, sizeof(bmp_1bpp) - 1, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(noimage, 0, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 4, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 4, NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(NULL, 0, NULL, NULL, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
/* test BMP support */
hr = D3DX11GetImageInfoFromMemory(bmp_1bpp, sizeof(bmp_1bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -805,10 +806,10 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_2bpp, sizeof(bmp_2bpp), NULL, &info, NULL);
- ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_FAIL, "Got unexpected hr %#lx.", hr);
hr = D3DX11GetImageInfoFromMemory(bmp_4bpp, sizeof(bmp_4bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -820,7 +821,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_8bpp, sizeof(bmp_8bpp), NULL, &info, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -832,7 +833,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_32bpp_xrgb, sizeof(bmp_32bpp_xrgb), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -844,7 +845,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_BMP, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -857,7 +858,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
/* Grayscale PNG */
hr = D3DX11GetImageInfoFromMemory(png_grayscale, sizeof(png_grayscale), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 1, "Unexpected width %u.\n", info.Width);
ok(info.Height == 1, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -870,7 +871,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
/* test DDS support */
hr = D3DX11GetImageInfoFromMemory(dds_24bit, sizeof(dds_24bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -881,7 +882,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_24bit, sizeof(dds_24bit) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -892,7 +893,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_16bit, sizeof(dds_16bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -904,7 +905,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
memset(&info, 0, sizeof(info));
hr = D3DX11GetImageInfoFromMemory(dds_16bit, sizeof(dds_16bit) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 2, "Unexpected width %u.\n", info.Width);
ok(info.Height == 2, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -916,7 +917,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
memset(&info, 0, sizeof(info));
hr = D3DX11GetImageInfoFromMemory(dds_8bit, sizeof(dds_8bit), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 16, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -927,7 +928,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_cube_map, sizeof(dds_cube_map), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -938,7 +939,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_cube_map, sizeof(dds_cube_map) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 1, "Unexpected depth %u.\n", info.Depth);
@@ -949,7 +950,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_volume_map, sizeof(dds_volume_map), NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 2, "Unexpected depth %u.\n", info.Depth);
@@ -960,7 +961,7 @@ static void test_D3DX11GetImageInfoFromMemory(void)
ok(info.ImageFileFormat == D3DX11_IFF_DDS, "Unexpected image file format %#x.\n", info.ImageFileFormat);
hr = D3DX11GetImageInfoFromMemory(dds_volume_map, sizeof(dds_volume_map) - 1, NULL, &info, NULL);
- ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(info.Width == 4, "Unexpected width %u.\n", info.Width);
ok(info.Height == 4, "Unexpected height %u.\n", info.Height);
ok(info.Depth == 2, "Unexpected depth %u.\n", info.Depth);
--
2.30.2
1
0
[PATCH v3 2/2] user32: DefWindowProc(WM_NCCALCSIZE) should return 0.
by Dmitry Timoshkov Feb. 3, 2022
by Dmitry Timoshkov Feb. 3, 2022
Feb. 3, 2022
v3: As suggested by Alexandre changed NC_HandleNCCalcSize to not return a value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37609
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/user32/controls.h | 2 +-
dlls/user32/defwnd.c | 3 ++-
dlls/user32/nonclient.c | 9 ++-------
dlls/user32/tests/win.c | 6 ------
4 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index ce14d13171f..52584748768 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -168,7 +168,7 @@ extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
/* nonclient area */
extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
-extern LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
+extern void NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c
index abb73e73ca8..a8978c2d847 100644
--- a/dlls/user32/defwnd.c
+++ b/dlls/user32/defwnd.c
@@ -260,7 +260,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
case WM_NCCALCSIZE:
- return NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
+ NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
+ break;
case WM_WINDOWPOSCHANGING:
return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam );
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 639cca707fb..f944ed568a4 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -346,19 +346,15 @@ BOOL WINAPI DECLSPEC_HOTPATCH AdjustWindowRectExForDpi( LPRECT rect, DWORD style
*
* Handle a WM_NCCALCSIZE message. Called from DefWindowProc().
*/
-LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
+void NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
{
RECT tmpRect = { 0, 0, 0, 0 };
- LRESULT result = 0;
LONG cls_style = GetClassLongW(hwnd, GCL_STYLE);
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
LONG exStyle = GetWindowLongW( hwnd, GWL_EXSTYLE );
if (winRect == NULL)
- return 0;
-
- if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW;
- if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW;
+ return;
if (!(style & WS_MINIMIZE))
{
@@ -413,7 +409,6 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
winRect->right = winRect->left;
winRect->bottom = winRect->top;
}
- return result;
}
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 4aeb3816db2..847093710a5 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -1236,7 +1236,6 @@ static void test_nonclient_area(HWND hwnd)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
-todo_wine_if(ret != 0)
ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
@@ -1255,7 +1254,6 @@ todo_wine_if(ret != 0)
rc = rc_window;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
-todo_wine_if(ret != 0)
ok(!ret, "got %08lx\n", ret);
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
ok(EqualRect(&rc, &rc_client),
@@ -12673,25 +12671,21 @@ static void test_WM_NCCALCSIZE(void)
params.lppos = &winpos;
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
params.rgrc[0] = window_rect;
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
GetWindowRect(hwnd, &window_rect);
ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
GetWindowRect(hwnd, &window_rect);
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
-todo_wine
ok(!ret, "got %08lx\n", ret);
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
--
2.34.1
2
2
This simplifies getting a connection to the TestAgent server with
elevated privileges.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/LibvirtTool.pl | 60 ++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index b186e19c39..51ed8e73e8 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -257,6 +257,28 @@ sub ChangeStatus($$;$)
return 0;
}
+=pod
+=over 12
+
+=item C<GetPrivilegedTA()>
+
+Returns a connection to a TestAgent server with elevated privileges.
+
+If the server running on the regular port does not have elevated privileges
+this assumes that the one on the alternate port will. It is up to the caller
+to report an error if that's not the case.
+
+=back
+=cut
+
+sub GetPrivilegedTA($)
+{
+ my ($TA) = @_;
+
+ # Use SetTime() to detect if privileged operations are allowed.
+ return $TA->SetTime() ? $TA : $VM->GetAgent(1);
+}
+
sub ShutDown()
{
my $Domain = $VM->GetDomain();
@@ -270,30 +292,15 @@ sub ShutDown()
Debug(Elapsed($Start), " Performing a clean shutdown of $VMKey $CurrentSnapshot\n");
LogMsg "Performing a clean shutdown of $VMKey $CurrentSnapshot\n";
- # Use SetTime() to detect if privileged operations are allowed.
- my $TA = $VM->GetAgent();
- if (!$TA->SetTime())
- {
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- $TA->Disconnect();
- $TA = $VM->GetAgent(1);
- if (!$TA->SetTime())
- {
- Error "Unable to get a privileged TestAgent: ". $TA->GetLastError() ."\n";
- $TA->Disconnect();
- return 0;
- }
- }
-
my $Success = 1;
my $Cmd = $VM->Type =~ /^win(?:32|64)$/ ?
["shutdown.exe", "/p", "/d", "00:00"] :
["/sbin/shutdown", "--poweroff", "now"];
Debug(Elapsed($Start), " Running @$Cmd\n");
- if (!$TA->Run($Cmd, 0))
+ my $PTA = GetPrivilegedTA($VM->GetAgent());
+ if (!$PTA->Run($Cmd, 0))
{
- Error "Could not run @$Cmd: ". $TA->GetLastError() ."\n";
+ Error "Could not run @$Cmd: ". $PTA->GetLastError() ."\n";
$Success = 0;
}
else
@@ -311,7 +318,8 @@ sub ShutDown()
sleep(1);
}
}
- $TA->Disconnect();
+ $PTA->Disconnect();
+
Debug(Elapsed($Start), " Successfully shut down $VMKey\n");
LogMsg "Successfully shut down $VMKey\n";
return $Success;
@@ -496,16 +504,11 @@ sub SetupTestAgentd($$$$)
# This is needed not only for the tests (date is important when checking
# HTTPS certificates), but also for the build (if the time moves forward
# during the build some ccache versions will return a compilation error).
- if (!$TA->SetTime())
+ my $PTA = GetPrivilegedTA($TA);
+ FatalError("Cannot set the VM system time\n") if (!$PTA);
+ if (!$PTA->SetTime())
{
- # Not a fatal error. Try the next port in case the VM runs a privileged
- # TestAgentd daemon there.
- my $PrivilegedTA = $VM->GetAgent(1);
- if (!$PrivilegedTA->SetTime())
- {
- FatalError("Unable to set the VM system time: ". $PrivilegedTA->GetLastError() ."\n");
- }
- $PrivilegedTA->Disconnect();
+ FatalError("Setting the VM system time failed: ". $PTA->GetLastError() ."\n");
}
if ($Booting and $VM->Type eq "wine")
@@ -543,6 +546,7 @@ sub SetupTestAgentd($$$$)
FatalError("The VM has been rebooted too many times: start.count=$Count > 1");
}
}
+ $PTA->Disconnect();
$TA->Disconnect();
}
--
2.30.2
1
0